feat: 移除了不必要的JSON响应返回逻辑
This commit is contained in:
parent
03625cb601
commit
caaac6882c
@ -20,10 +20,6 @@ class ExceptionHandler extends Handler
|
||||
if ($exception instanceof Dumper) {
|
||||
return \response(self::convertToHtml($exception));
|
||||
}
|
||||
// json请求返回json数据
|
||||
if ($request->expectsJson()) {
|
||||
return json(['code' => $exception->getCode() ?: 500, 'msg' => $exception->getMessage(), 'show' => 1]);
|
||||
}
|
||||
// 非json请求则返回一个页面
|
||||
return new Response(200, [], $exception->getMessage());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user