fix cleanup do not run under secret login

This commit is contained in:
xiaomlove
2022-04-10 17:39:25 +08:00
parent b7c1102500
commit 8216cb364c
5 changed files with 8 additions and 9 deletions

View File

@@ -78,15 +78,10 @@ class Handler extends ExceptionHandler
{
$data = $request->all();
$httpStatusCode = $this->getHttpStatusCode($e);
if ($httpStatusCode == 200) {
$msg = $e->getMessage() ?: get_class($e);
} else {
$msg = 'Server Error';
}
$msg = $e->getMessage();
$trace = $e->getTraceAsString();
if (config('app.debug')) {
$data['trace'] = $e->getTraceAsString();
$data['trace'] = $trace;
}
return new JsonResponse(
fail($msg, $data),