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
No exception logged when JSON request conversion fails in an annotated service #2041
Comments
Is it possible for me to take a look at this and possibly fix it by adding a log statement? |
@sivaalli Sure! Thanks a lot for looking into it. 🙇 |
Hi @trustin , while making a change I got a doubt and wanted to get it clarified. If a
|
That is an excellent question, @sivaalli. IIRC, we already have a fallback exception handler that performs some logging: Because What we could do in my opinion is to make |
Thank you @trustin for your reply. Your plan sounds good to me. Currently And since we already have a |
Yeah, I think it's good. If other users report about the increased warning logs, we could reconsider it. |
Motivation: When a JSON document cannot be converted into Java object, an `IllegalArgumentException` is thrown. And this is converted to 400 status code. But it would be nice to have a log statement in `DefaultExceptionHandler` to log what is wrong with the request Closes #2041
For example:
When an HTTP client posts a JSON document:
.. a
400 Bad Request
response is sent by the server, but no log message is written, making it hard to know what is wrong. The problem goes away if a user annotatesMyValue.<init>
with@JsonCreator
and the parametervalue
with@JsonProperty("value")
.The text was updated successfully, but these errors were encountered: