|
@@ -96,12 +96,12 @@ class Handler extends ExceptionHandler
|
|
|
|
|
|
// 验证异常
|
|
|
$this->renderable(function (ValidationException $e) {
|
|
|
- return $this->formatJsonResponse(200, $e->validator->errors()->first(), Response::HTTP_UNPROCESSABLE_ENTITY);
|
|
|
+ return $this->formatJsonResponse(Response::HTTP_UNPROCESSABLE_ENTITY, $e->validator->errors()->first(), 200);
|
|
|
});
|
|
|
|
|
|
// HTTP异常
|
|
|
$this->renderable(function (HttpException $e) {
|
|
|
- return $this->formatJsonResponse(200, $e->getMessage(), $e->getStatusCode());
|
|
|
+ return $this->formatJsonResponse($e->getStatusCode(), $e->getMessage(), 200);
|
|
|
});
|
|
|
|
|
|
// 业务异常
|