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

DefaultExceptionMapper documentation #4880

Merged
merged 3 commits into from
Oct 11, 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
4 changes: 4 additions & 0 deletions docs/src/main/docbook/jersey.ent
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<!ENTITY jaxb-api-jar.version "$jaxb-api-jar-version">
<!ENTITY jax-rs.version "$jax-rs-api-jar-version">
<!ENTITY jax-rs21.version "2.1.6">
<!ENTITY jax-rs31.spec.version "3.1">
<!ENTITY jakarta.el.version "$jakarta.el-version">
<!ENTITY jakarta.el-impl.version "$jakarta.el-impl-version">
<!ENTITY jax-rs-api-jar.version "$jax-rs-api-jar-version">
Expand Down Expand Up @@ -60,6 +61,7 @@
<!ENTITY jaxrs.release.uri "https://github.com/eclipse-ee4j/jaxrs-api">
<!ENTITY jaxrs.javadoc.uri "https://eclipse-ee4j.github.io/jaxrs-api/apidocs/&jax-rs.version;/jakarta/ws/rs">
<!ENTITY jaxrs21.javadoc.uri "https://eclipse-ee4j.github.io/jaxrs-api/apidocs/&jax-rs21.version;/javax/ws/rs">
<!ENTITY jaxrs31.spec.uri "https://jakarta.ee/specifications/restful-ws/&jax-rs31.spec.version;/jakarta-restful-ws-spec-&jax-rs31.spec.version;.html">
<!ENTITY jsonb.javadoc.uri "https://javaee.github.io/javaee-spec/javadocs/javax/json/bind">
<!ENTITY jersey.documentation.uri "https://eclipse-ee4j.github.io/jersey.github.io">

Expand Down Expand Up @@ -248,6 +250,7 @@
<!ENTITY jaxrs.ext.RuntimeDelegate.HeaderDelegate "<link xlink:href='&jaxrs.javadoc.uri;/ext/RuntimeDelegate.HeaderDelegate.html'>RuntimeDelegate.HeaderDelegate&lt;T&gt;</link>">
<!ENTITY jaxrs21.sse.SseEventSink "<link xlink:href='&jaxrs21.javadoc.uri;/sse/SseEventSink.html'>SseEventSink</link>">
<!ENTITY jaxrs21.sse.Sse "<link xlink:href='&jaxrs21.javadoc.uri;/sse/Sse.html'>Sse</link>">
<!ENTITY jaxrs31.exceptionMapperProvider "<link xlink:href='&jaxrs31.spec.uri;#exceptionmapper'>Exception Mapping Providers</link>">

<!ENTITY jdk6.Boolean "<link xlink:href='&jdk6.javadoc.uri;/java/lang/Boolean.html'>Boolean</link>">
<!ENTITY jdk6.CountDownLatch "<link xlink:href='&jdk6.javadoc.uri;/java/util/concurrent/CountDownLatch.html'>CountDownLatch</link>">
Expand Down Expand Up @@ -367,6 +370,7 @@
<!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
9 changes: 9 additions & 0 deletions docs/src/main/docbook/representations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,15 @@ public class EntityNotFoundMapper implements ExceptionMapper&lt;jakarta.persiste
and let other provider to be chosen for the exception mapping.
</para>

<para>
Since Jersey 3.1.0 the &jersey.common.internal.DefaultExceptionMapper; 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.
</para>

</section>

<section>
Expand Down