We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, my app throws an exception like:
throw new HttpException( 400, 'My custom message' );
I expect the response to be:
{"error":{"code":400,"message":"My custom message"}}
but I get:
{"error":{"code":400,"message":"Bad Request"}}
I tried to customize the error message with an ExceptionWrapperHandler, defined as:
fos_rest: view: exception_wrapper_handler: AppBundle\Handler\ExceptionWrapperHandle
but this declaration seems to be ignored. Am I missing something?
Thanks
The text was updated successfully, but these errors were encountered:
we have a configuration setting to determine for what exceptions we expose the message, which is handled in the ExceptionController: https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Controller/ExceptionController.php#L174
see here for the docs: https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/4-exception-controller-support.md
Sorry, something went wrong.
I made some changes here .. its now also possible to configure a service: #942
No branches or pull requests
Hi,
my app throws an exception like:
I expect the response to be:
but I get:
I tried to customize the error message with an ExceptionWrapperHandler, defined as:
but this declaration seems to be ignored. Am I missing something?
Thanks
The text was updated successfully, but these errors were encountered: