Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch HandlerFailedExceptions on InMemorySymfonyQueryBus.php #392

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abadb
Copy link

@abadb abadb commented Nov 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant