Open dcr31000 opened 1 year ago
@dcr31000 Maybe do you need to add under exception.codes:
'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
Useful doc: https://github.com/FriendsOfSymfony/FOSRestBundle/blob/3.x/Resources/doc/4-exception-controller-support.rst
I have a Symfony v6 application with FosRestBundle.
When I go to an endpoint which throw an exception, I got a page with the full error and the stack trace. Also in production mode.
The kernel is configured like this:
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
And this is the configuration of fos_rest I use:
I do not found how to disable the stack trace in production environment.
Thanks for your help