-
Notifications
You must be signed in to change notification settings - Fork 356
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
Documentation/Implementation issue for the default exception mapper in Jersey 3.1.0 #5192
Milestone
Comments
This was referenced Nov 11, 2022
This was referenced Jan 31, 2023
This was referenced Feb 11, 2023
This was referenced Mar 11, 2023
1 task
This was referenced Mar 23, 2023
Closed
This was referenced Aug 14, 2023
1 task
This was referenced Sep 11, 2023
1 task
This was referenced Nov 25, 2023
1 task
This was referenced Jan 3, 2024
1 task
1 task
1 task
Closed
1 task
1 task
1 task
This was referenced Jul 9, 2024
1 task
1 task
1 task
1 task
1 task
1 task
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Jersey team,
the current documentation for the default exception mapper doesn't correctly explain the behaviour of Jersey 3.1.0.
The JAX-RS spec isn't that restrictive on the processing of the default exception mapper, it only states that a mapper for a
Throwable
has to be provided.While upgrading an existing application to Jersey 3.1.0 I experienced that an other exception mapper for the
Throwable
type won't get invoked, but rather the default exception mapper.This behaviour should be caused here. The collection for the exception mappers is a
Set
, so the default exception mapper may be processed earlier than an other one forThrowable
.From the perspective of the spec, the current implementation is fine and only the documentation is misleading. But the behaviour of the current Jersey documentation is the one to prefer IMHO. So I'd suggest to use a list and add the default exception mapper as the last element.
The text was updated successfully, but these errors were encountered: