Skip to content

Commit d968601

Browse files
Merge pull request #57 from dapr/fix/no-output
The hunt for the empty response
2 parents 8c4bcd0 + 3e18516 commit d968601

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/App.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
use Psr\Http\Message\StreamInterface;
4141
use Psr\Log\LoggerInterface;
4242
use Psr\Log\LogLevel;
43+
use Throwable;
4344

4445
/**
4546
* Class App
@@ -199,7 +200,7 @@ public function start(?ServerRequestInterface $request = null): void
199200
} catch (NotFound $exception) {
200201
$response = $this->psr17Factory->createResponse(404)->withAddedHeader('Content-Type', 'application/json');
201202
$this->logger->info('Route threw a NotFound exception, returning 404.', ['exception' => $exception]);
202-
} catch (Exception $exception) {
203+
} catch (Throwable $exception) {
203204
$response = $this->psr17Factory->createResponse(500)->withBody(
204205
$this->psr17Factory->createStream($this->serializer->as_json($exception))
205206
)->withHeader('Content-Type', 'application/json');

0 commit comments

Comments
 (0)