Closed jon-ht closed 4 years ago
Inspired from https://api-platform.com/docs/core/errors/#converting-php-exceptions-to-http-errors.
I think this way it's easier to override status code rather than adding another if statement in ExceptionSubscriber
if
ExceptionSubscriber
P.S. I've also fixed unit test for JsonBodyParserSubscriberTest.php because it throws a depreciation exception causing failed tests
JsonBodyParserSubscriberTest.php
Thanks @jon-ht for this. Your first PR here is merged 👍
Inspired from https://api-platform.com/docs/core/errors/#converting-php-exceptions-to-http-errors.
I think this way it's easier to override status code rather than adding another
if
statement inExceptionSubscriber
P.S. I've also fixed unit test for
JsonBodyParserSubscriberTest.php
because it throws a depreciation exception causing failed tests