diff --git a/src/ExceptionHandler.php b/src/ExceptionHandler.php index dd0e119..669656f 100644 --- a/src/ExceptionHandler.php +++ b/src/ExceptionHandler.php @@ -65,7 +65,7 @@ public function __invoke(Request $request, Response $response, callable $next) try { $response = $next($request, $response); } catch (Exception $e) { - $response = $this->exceptionResponse->withStatus(500); + $response = $this->exceptionResponse->withStatus(500, $e->getMessage()); $response->getBody()->write(get_class($e) . ': ' . $e->getMessage()); } return $response;