diff --git a/src/Http/Middleware/HandleErrors.php b/src/Http/Middleware/HandleErrors.php index 0c8897d9d..2790584a8 100644 --- a/src/Http/Middleware/HandleErrors.php +++ b/src/Http/Middleware/HandleErrors.php @@ -60,11 +60,11 @@ class HandleErrors try { return $out($request, $response); } catch (Exception $e) { - return $this->formatException($e); + return $this->formatException($e, $request, $response, $out); } } - protected function formatException(Exception $error) + protected function formatException(Exception $error, Request $request, Response $response, callable $out = null) { $status = 500; $errorCode = $error->getCode();