Skip to content

Commit

Permalink
catch 400 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed Feb 24, 2023
1 parent 7f63fcd commit dd0305f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Validator/FriendlyCaptchaValidValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public function validate($value, Constraint $constraint)
'solution' => $value,
],
]);

$content = $response->getContent();
}
catch (HttpExceptionInterface $ex) {
$this->context->addViolation($constraint->message);
return;
}

$content = $response->getContent();

if (!$content) {
$this->context->addViolation($constraint->message);

Expand Down

0 comments on commit dd0305f

Please sign in to comment.