Skip to content

Commit

Permalink
fix: 异常提示
Browse files Browse the repository at this point in the history
  • Loading branch information
jiannei committed Sep 20, 2021
1 parent 3ad9244 commit 97c9b33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Support/Traits/ExceptionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function buildFailedValidationResponse(Request $request, array $errors

return Response::fail(
is_array($firstMessage) ? Arr::first($firstMessage) : $firstMessage,
Arr::get(Config::get('response.exception'), ValidationException::class, 422),
Arr::get(Config::get('response.exception'), ValidationException::class.'.code', 422),
$errors
);
}
Expand All @@ -81,7 +81,7 @@ protected function invalidJson($request, ValidationException $exception)
{
return Response::fail(
$exception->validator->errors()->first(),
Arr::get(Config::get('response.exception'), ValidationException::class, 422),
Arr::get(Config::get('response.exception'), ValidationException::class.'.code', 422),
$exception->errors()
);
}
Expand Down

0 comments on commit 97c9b33

Please sign in to comment.