Skip to content
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

Allow inclusion of request body for JsonParseException #86

Closed
cowwoc opened this issue Jul 5, 2013 · 3 comments
Closed

Allow inclusion of request body for JsonParseException #86

cowwoc opened this issue Jul 5, 2013 · 3 comments
Milestone

Comments

@cowwoc
Copy link

cowwoc commented Jul 5, 2013

As a follow-up to issue #77, please include the entire request body in the exception's message in case of a parsing error. Users will need this extra context to figure out why the parsing error occurred.

@raulraja
Copy link

+1 This is a much needed feature since remote services can return anything and the error messages are cryptic as they stand now. It is not always easy to do this from the application since most usages of Jacksons are wrapped in libraries.

@cowtowncoder
Copy link
Member

I recommend buffering content first, feeding jackson the byte[]. I don't really see myself working on implementing this feature in core Jackson; but I am always open for contributions.

@cowtowncoder cowtowncoder added this to the 2.8.0 milestone Apr 15, 2016
@cowtowncoder cowtowncoder changed the title Include request body for JsonParseException Allow inclusion of request body for JsonParseException Apr 15, 2016
@cowtowncoder
Copy link
Member

So, as can be seen from above, #258 makes it possible to attach content into exception.
Could perhaps consider automation for simple cases where input comes as String or byte[]...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants