1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Refactor notify exception to clean up api exception handling

This commit is contained in:
Thomas Kuschan
2023-06-14 11:07:13 +02:00
parent 321a459421
commit 34d8268b2b
2 changed files with 36 additions and 8 deletions

View File

@ -103,10 +103,6 @@ class Handler extends ExceptionHandler
$code = $e->status;
}
if (method_exists($e, 'getStatus')) {
$code = $e->getStatus();
}
$responseData['error']['code'] = $code;
return new JsonResponse($responseData, $code, $headers);