We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8c4bcd0 + 3e18516 commit d968601Copy full SHA for d968601
1 file changed
src/lib/App.php
@@ -40,6 +40,7 @@
40
use Psr\Http\Message\StreamInterface;
41
use Psr\Log\LoggerInterface;
42
use Psr\Log\LogLevel;
43
+use Throwable;
44
45
/**
46
* Class App
@@ -199,7 +200,7 @@ public function start(?ServerRequestInterface $request = null): void
199
200
} catch (NotFound $exception) {
201
$response = $this->psr17Factory->createResponse(404)->withAddedHeader('Content-Type', 'application/json');
202
$this->logger->info('Route threw a NotFound exception, returning 404.', ['exception' => $exception]);
- } catch (Exception $exception) {
203
+ } catch (Throwable $exception) {
204
$response = $this->psr17Factory->createResponse(500)->withBody(
205
$this->psr17Factory->createStream($this->serializer->as_json($exception))
206
)->withHeader('Content-Type', 'application/json');
0 commit comments