Change validation failure to 422 to make it consistent with Laravel's default
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
8fa690b635
commit
81b66d0039
1 changed files with 1 additions and 1 deletions
|
@ -121,6 +121,6 @@ class Handler extends ExceptionHandler
|
||||||
*/
|
*/
|
||||||
protected function invalidJson($request, ValidationException $exception)
|
protected function invalidJson($request, ValidationException $exception)
|
||||||
{
|
{
|
||||||
return response()->json(Helper::formatStandardApiResponse('error', null, $exception->errors(), 400));
|
return response()->json(Helper::formatStandardApiResponse('error', null, $exception->errors(), 422));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue