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

Documentation for the default Exception mapper #4923

Merged
merged 3 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/src/main/docbook/jersey.ent
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@
<!ENTITY jersey.common.CommonProperties.OUTBOUND_CONTENT_LENGTH_BUFFER_CLIENT "<link xlink:href='&jersey.javadoc.uri.prefix;/CommonProperties.html#OUTBOUND_CONTENT_LENGTH_BUFFER_CLIENT'>CommonProperties.OUTBOUND_CONTENT_LENGTH_BUFFER_CLIENT</link>" >
<!ENTITY jersey.common.CommonProperties.OUTBOUND_CONTENT_LENGTH_BUFFER_SERVER "<link xlink:href='&jersey.javadoc.uri.prefix;/CommonProperties.html#OUTBOUND_CONTENT_LENGTH_BUFFER_SERVER'>CommonProperties.OUTBOUND_CONTENT_LENGTH_BUFFER_SERVER</link>" >
<!ENTITY jersey.common.CommonProperties.PROVIDER_DEFAULT_DISABLE "<link xlink:href='&jersey.javadoc.uri.prefix;/CommonProperties.html#PROVIDER_DEFAULT_DISABLE'>CommonProperties.PROVIDER_DEFAULT_DISABLE</link>" >
<!ENTITY jersey.common.internal.DefaultExceptionMapper "<link xlink:href='&jersey.javadoc.uri.prefix;/internal/DefaultExceptionMapper.html'>DefaultExceptionMapper</link>">
<!ENTITY jersey.common.internal.inject.DisposableSupplier "<link xlink:href='&jersey.javadoc.uri.prefix;/internal/inject/DisposableSupplier.html'>DisposableSupplier</link>">
<!ENTITY jersey.common.internal.inject.InjectionManager "<link xlink:href='&jersey.javadoc.uri.prefix;/internal/inject/InjectionManager.html'>InjectionManager</link>">
<!ENTITY jersey.common.internal.inject.AbstractBinder "<link xlink:href='&jersey.javadoc.uri.prefix;/internal/inject/AbstractBinder.html'>AbstractBinder</link>">
Expand Down
6 changes: 5 additions & 1 deletion docs/src/main/docbook/representations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,16 @@ public class EntityNotFoundMapper implements ExceptionMapper&lt;jakarta.persiste
</para>

<para>
Since Jersey 3.1.0 the &jersey.common.internal.DefaultExceptionMapper; is implemented.
Since Jersey 3.1.0 the default <literal>ExceptionMapper</literal> is implemented.
It is required by JAX-RS 3.1 specification (&jaxrs31.exceptionMapperProvider;).
The default behaviour of the mapper is to return a message from an exception caught and set the response status
to 500 (internal server error). In case of a &jaxrs.WebApplicationException; with a response that response is returned.
If response inside the &lit.jaxrs.WebApplicationException; is NULL the exception is being processed according to the
default behaviour.

The Default exception mapper is package private and can not be referenced. Its presence is required only by
JAX-RS 3.1 specification. Processing of the default Exception Mapper occurs at the very end of the exception
processing chain. It is invoked only if nothing else in the chain was invoked before.
</para>

</section>
Expand Down