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

ExceptionMappers should be implemented by the users not by the library #53

Closed
raspacorp opened this issue Jul 3, 2014 · 5 comments
Closed

Comments

@raspacorp
Copy link

Your exception mappers for json pasing and json mapping are shadowing my exception mappers which I use to produce an structured json error response, this kind of error handling should be done by the application that is using your library, otherwise you force the rest apis to follow your response messaging convention. I am using jersey 2.10 and my exception mappers are never picked up but yours com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper and com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper.

@cowtowncoder
Copy link
Member

I suggest you bring this up on mailing list -- for backwards compatibility, simple removal is not an option, there needs to be a graceful way to upgrade. Improvements to handling (especailly via pull requests) are welcome too of course.

@prb
Copy link
Member

prb commented Jul 4, 2014

You should be able to unregister the Jackson ExceptionMappers in your Jersey configuration in the meantime.

@raspacorp
Copy link
Author

Thanks for your response, I will try to unregister the exception mapper if
such a thing is possible, never done that before.

On 4 July 2014 12:05, Paul Brown [email protected] wrote:

You should be able to unregister the Jackson ExceptionMappers in your
Jersey configuration in the meantime.


Reply to this email directly or view it on GitHub
#53 (comment)
.

@raspacorp
Copy link
Author

Actually as far as I found in my research it is not possible to unregister
an exception mapper in Jersey, another work-around could be to register
manually the jackson provider instead of the jackson feature in Jersey.
Some people in Internet recommend doing that, but the Jersey documentation
recommends to use the org.glassfish.jersey.jackson.JacksonFeature.class
which is the one that registers the mappers that I want to get rid of. So
that is the dilemma.

On 5 July 2014 00:45, Ramiro Serrato [email protected] wrote:

Thanks for your response, I will try to unregister the exception mapper if
such a thing is possible, never done that before.

On 4 July 2014 12:05, Paul Brown [email protected] wrote:

You should be able to unregister the Jackson ExceptionMappers in your
Jersey configuration in the meantime.


Reply to this email directly or view it on GitHub
#53 (comment)
.

@cowtowncoder
Copy link
Member

I think this is dup of #22

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