mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-10 00:49:37 +00:00
Auto commit for release 'develop' on 2025-01-26
This commit is contained in:
@@ -134,8 +134,9 @@ class Handler extends ExceptionHandler
|
||||
|
||||
return response()->json(['message' => $e->getMessage(), 'exception' => 'BadHttpHeaderException'], $e->statusCode);
|
||||
}
|
||||
if(($e instanceof ValidationException || $e instanceof NumberFormatException) && $expectsJson) {
|
||||
if (($e instanceof ValidationException || $e instanceof NumberFormatException) && $expectsJson) {
|
||||
$errorCode = 422;
|
||||
|
||||
return response()->json(
|
||||
['message' => sprintf('Validation exception: %s', $e->getMessage()), 'errors' => ['field' => 'Field is invalid']],
|
||||
$errorCode
|
||||
|
||||
Reference in New Issue
Block a user