Skip to content

Commit

Permalink
Fix resolve error code with http 419
Browse files Browse the repository at this point in the history
  • Loading branch information
ycs77 committed May 28, 2024
1 parent 5a20685 commit 7abf878
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ public function handle(Request $request, SymfonyResponse $response, Throwable $e
return $response;
}

$code = $e instanceof HttpExceptionInterface ? $e->getStatusCode() : 500;
if ($e instanceof HttpExceptionInterface) {
$code = $e->getStatusCode();
} else {
$code = $response->getStatusCode();
}

$messages = $this->resolveMessages($e);

Expand Down

0 comments on commit 7abf878

Please sign in to comment.