-
Notifications
You must be signed in to change notification settings - Fork 41.1k
I get two body after serialize exception #24633
New issue
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
Comments
I can't say for certain without some more information, but I would guess that you have written and flushed some output to the response stream before the error handling has kicked in. If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue. |
@darkgirl this comment might give you some insight.
I think an exception handler catching |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
sorry for taking so long to reply. |
Thanks for the sample. An error is occurring while trying to serialise the response from your |
|
Yes. Your error controller is returning a POJO that cannot be serialised the JSON. This serialisation failure results in an error.
This is the situation that @bclozel described above:
Your exception handler is broader than this as it handles If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. |
Hi,
I had custom my own exception controller like this
and when there is a json serialize exception, I found I get two body from response.
Why is this so? and how to make it only response once before I solve the serialize exception?
The text was updated successfully, but these errors were encountered: