Skip to content

Tag: symfony5

Symfony Exception Subscriber not triggered

I need to format error messages and output it in JSON format. I have the following event subscriber: And following configuration in ./config/services.yaml This event subscriber is working when e.g. controller throws error. But if I have some other error e.g. wrong DI injection then output is still in Html for…