diff --git a/src/Exceptions/Handler.php b/src/Exceptions/Handler.php index 7d6481d..ddfc128 100644 --- a/src/Exceptions/Handler.php +++ b/src/Exceptions/Handler.php @@ -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);