-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Allows users to exclude DefaultMismatchedInputException #43126
Conversation
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I have a few comments here.
Should we rename the class to DefaultMismatchedInputExceptionMapper
before documenting it somewhere? When I read the description, I thought it was an exception and had a hard time understanding the issue.
Second question: isn't it easier to create a mapper with a higher priority that specifically handles this exception instead of promoting a rather obscure feature?
And finally, I wonder if at some point, these dev modes features should be handled specifically after the exception mappers have been applied (and only be triggered if no ExceptionMapper handled the exception).
How about
That doesn't work (as per JAX-RS / Jakarta REST) when users want to handle a super class of
I don't really understand this, can you elaborate a little? |
Looks good.
Maybe I wasn't clear but my understanding was that they would have to have a specific mapper for But you can start your way and see how to make it easier to grasp later.
I think it's not the first time we have dev mode features in the way of how you would expect a standard JAX-RS implementation to work. Thus why I was wondering if we should have a way to enable these features only if something from the user didn't catch things earlier. Basically, we should find a way for our mappers (or not implement them as mappers) to be very last resort if nothing else from the users intervened first. |
That would work today without any configuration. What does not work as users would like, is handling all exceptions that are super classes of this exception.
Yeah, that would be nice, but unfortunately the resolution rules don't really allow this - hence the ability to remove this one.
Agreed, but it's also surprising when code exists in dev-mode and affects the behavior of the system to not exist in prod mode, so I am really not sure what the best solution is here. |
A few users have run into an issue where they are trying to handle all Jackson exceptions but the existence of DefaultMismatchedInputException prevents that for MismatchedInputException (as per JAX-RS / Jakarta REST rules). This change allows users to do use: quarkus.class-loading.removed-resources."io.quarkus\:quarkus-rest-jackson"=io/quarkus/resteasy/reactive/jackson/runtime/mappers/DefaultMismatchedInputException.class in order to have Quarkus ignore the mapper.
39ca563
to
b60dbf8
Compare
PR updated |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will handle the comment given I'm already on this subject, no need for you to context switch.
88e487d
to
e9cddc0
Compare
Force pushed with the doc fix squashed! |
Status for workflow
|
Status for workflow
|
Thanks! |
A few users have run into an issue where
they are trying to handle all Jackson exceptions
but the existence of
DefaultMismatchedInputException
prevents that for
MismatchedInputException
(as per JAX-RS / Jakarta REST rules).
This change allows users to do use:
quarkus.class-loading.removed-resources."io.quarkus\:quarkus-rest-jackson"=io/quarkus/resteasy/reactive/jackson/runtime/mappers/DefaultMismatchedInputException.class
in order to have Quarkus ignore the mapper.
P.S. We could also introduce a specific property for this, but currently I am on the fence about that...