php-ddd-example icon indicating copy to clipboard operation
php-ddd-example copied to clipboard

Catch HandlerFailedExceptions on InMemorySymfonyQueryBus.php

Open abadb opened this issue 11 months ago • 0 comments

The InMemorySymfonyQueryBus.php implementation should catch HandlerFailedExceptions to get the throwed exception from the query handler.

This way, ApiExceptionListener can correctly map the status code for the exception.

Without this fix, all exceptions throwed by the query bus, while the ApiExceptionListener is on, would read as an HandlerFailedException, regardless of the exception mappings defined in the controller.

abadb avatar Nov 29 '24 12:11 abadb