diff --git a/app/Http/Middleware/Profiler.php b/app/Http/Middleware/Profiler.php index 6eabebbf..ba8214a6 100644 --- a/app/Http/Middleware/Profiler.php +++ b/app/Http/Middleware/Profiler.php @@ -47,9 +47,11 @@ class Profiler try { $response = $next($request); - } catch (\Exception $e) { - $response = \Response::make(['exception' => $e->getTrace()], 500); + $response = \Response::make([ + 'message' => $e->getMessage(), + 'exception' => $e->getTrace() + ], 500); $profiler->log('error', $e->__toString(), []); }