Open SebastienTediber opened 2 years ago
Hello @goetas @W0rma
Do you have any ideas in how to use fos_rest error caching functionnality for version 3.X.X ? This would help us a lot.
Thank you,
Guillaume Bidan CTO Tediber
Hi!
I have also been facing this issue, trying to clean up the log output to focus on what matter and having uncaught exception is making it harder.
@SebastienTediber I think your configuration needs an update. Mine is working fine, here it is (the exception part):
fos_rest:
exception:
map_exception_codes: true
codes:
'InvalidArgumentException': 422
'Doctrine\ORM\EntityNotFoundException': 404
messages:
'InvalidArgumentException': true
'Doctrine\ORM\EntityNotFoundException': true
You also have to set exception_controller to null in twig.yaml, if you're using twig
Hello @InjustFr,
We investigated the issue further and came upon a Twig issue too indeed, that we fixed differently. I will look into what you propose though because it looks better than our solution.
Thanks
Hello again @InjustFr ,
We tried your solution and it works fine for us.
Thanks again
Hello,
Since we updated to 3.x.x, the exceptions I mapped in my config files aren't caught and a 500 is thrown instead.
Here is my configuration :
I have been trying with InvalidArgumentException thrown.
I have been changing the configuration a few times, adding the code to my exception too, it still does not work.