Reputation: 9279
I'm working on a RestApi with Symfony2 and https://github.com/FriendsOfSymfony/FOSRestBundle
I log all errors, and i send exception if there is a problem.
For example :
throw new AccessDeniedException("This is a message for my error");
When i am on dev mode, i can retrieve my message This is a message for my error
in the response, but in production mode, i only have {"error":{"code":403,"message":"Forbidden"}}
How can i edit the message in this error in production mode ?
Upvotes: 1
Views: 1183