mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 13:14:45 +02:00
Improved exception handler for AJAX requests
This commit is contained in:
parent
037a923363
commit
76049c5860
@ -72,10 +72,11 @@ class Handler extends ExceptionHandler
|
||||
|
||||
// If we are debugging, return the exception in it's full manner.
|
||||
return response()->json([
|
||||
'error' => $e->getMessage(),
|
||||
'error' => (empty($e->getMessage())) ? $exception : $e->getMessage(),
|
||||
'code' => $e->getCode(),
|
||||
'file' => $e->getFile(),
|
||||
'line' => $e->getLine()
|
||||
'line' => $e->getLine(),
|
||||
'trace' => $e->getTrace(),
|
||||
], 500);
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user