File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 40
40
use Psr \Http \Message \StreamInterface ;
41
41
use Psr \Log \LoggerInterface ;
42
42
use Psr \Log \LogLevel ;
43
+ use Throwable ;
43
44
44
45
/**
45
46
* Class App
@@ -199,7 +200,7 @@ public function start(?ServerRequestInterface $request = null): void
199
200
} catch (NotFound $ exception ) {
200
201
$ response = $ this ->psr17Factory ->createResponse (404 )->withAddedHeader ('Content-Type ' , 'application/json ' );
201
202
$ this ->logger ->info ('Route threw a NotFound exception, returning 404. ' , ['exception ' => $ exception ]);
202
- } catch (Exception $ exception ) {
203
+ } catch (Throwable $ exception ) {
203
204
$ response = $ this ->psr17Factory ->createResponse (500 )->withBody (
204
205
$ this ->psr17Factory ->createStream ($ this ->serializer ->as_json ($ exception ))
205
206
)->withHeader ('Content-Type ' , 'application/json ' );
You can’t perform that action at this time.
0 commit comments