Fix error handler not displaying exception message in debug env

This commit is contained in:
Bubka 2020-03-04 12:37:36 +01:00
parent 330fb68fc1
commit fe5f4c8b88

View File

@ -136,6 +136,7 @@ private function customApiResponse($exception, $debug)
$response['message'] = ($statusCode >= 500) ? 'Whoops, looks like something went wrong' : $exception->getMessage();
if (env('APP_DEBUG')) {
$response['originalMessage'] = $exception->getMessage();
$response['debug'] = $debug;
}