I'm on an api project using FOSRestBundle on Symfony 3.4 and have some error when I want to use my own error messages. It says me:
Controller "fos_rest.exception.twig_controller" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"
I'm stuck on this error, I think a config is missing but I don't understand which one...
Thanks
I found the solution: Add to your config.yml, in fos_rest:
fos_rest:
//
exception:
//
exception_controller: 'fos_rest.exception.controller:showAction'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With