mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
not found exception add log
This commit is contained in:
@@ -71,7 +71,8 @@ class Handler extends ExceptionHandler
|
||||
$this->renderable(function (NotFoundHttpException $e) {
|
||||
if ($e->getPrevious() && $e->getPrevious() instanceof ModelNotFoundException) {
|
||||
$exception = $e->getPrevious();
|
||||
return response()->json(fail($exception->getMessage(), request()->all()), 404);
|
||||
do_log(sprintf("NotFoundHttpException: %s, trace: %s", $exception->getMessage(), $exception->getTraceAsString()), 'error');
|
||||
return response()->json(fail($exception->getMessage(), request()->all()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user