diff --git a/src/Dispatcher.php b/src/Dispatcher.php index 85218fd56..5ec946556 100644 --- a/src/Dispatcher.php +++ b/src/Dispatcher.php @@ -541,7 +541,11 @@ protected function dispatch(InternalRequest $request) $response = $this->router->dispatch($request); if (! $response->isSuccessful() && ! $response->isRedirection()) { - throw new InternalHttpException($response); + $message = null; + if (isset($response->getOriginalContent()['message'])) { + $message = $response->getOriginalContent()['message']; + } + throw new InternalHttpException($response, $message); } if (! $this->raw) {