From 40c14a4be0ce0617a7e76a56177695bf94bda0e8 Mon Sep 17 00:00:00 2001 From: Maxim Nesen Date: Tue, 5 Oct 2021 14:20:50 +0200 Subject: [PATCH 1/3] DefaultExceptionMapper documentation Signed-off-by: Maxim Nesen --- docs/src/main/docbook/jersey.ent | 4 ++++ docs/src/main/docbook/representations.xml | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/src/main/docbook/jersey.ent b/docs/src/main/docbook/jersey.ent index f9f065b072..a7305b45bf 100644 --- a/docs/src/main/docbook/jersey.ent +++ b/docs/src/main/docbook/jersey.ent @@ -28,6 +28,7 @@ + @@ -60,6 +61,7 @@ + @@ -248,6 +250,7 @@ RuntimeDelegate.HeaderDelegate<T>"> SseEventSink"> Sse"> +Exception Mapping Providers"> Boolean"> CountDownLatch"> @@ -367,6 +370,7 @@ CommonProperties.OUTBOUND_CONTENT_LENGTH_BUFFER_CLIENT" > CommonProperties.OUTBOUND_CONTENT_LENGTH_BUFFER_SERVER" > CommonProperties.PROVIDER_DEFAULT_DISABLE" > +DefaultExceptionMapper"> DisposableSupplier"> InjectionManager"> AbstractBinder"> diff --git a/docs/src/main/docbook/representations.xml b/docs/src/main/docbook/representations.xml index 50515d69cd..ae7ab59a2c 100644 --- a/docs/src/main/docbook/representations.xml +++ b/docs/src/main/docbook/representations.xml @@ -298,6 +298,15 @@ public class EntityNotFoundMapper implements ExceptionMapper<jakarta.persiste and let other provider to be chosen for the exception mapping. + + 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 response status + to 500 (internal server error). In case of a &jaxrs.WebApplicationException; with response that response is returned. + If response inside the &lit.jaxrs.WebApplicationException; is NULL the exception is being processed according to the + default behaviour. + +
From 59b3da94b6001d7d50e4759f0d69830f51c7baa6 Mon Sep 17 00:00:00 2001 From: Maxim Nesen Date: Fri, 8 Oct 2021 07:38:05 +0200 Subject: [PATCH 2/3] Grammar fix Signed-off-by: Maxim Nesen --- docs/src/main/docbook/representations.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/docbook/representations.xml b/docs/src/main/docbook/representations.xml index ae7ab59a2c..67c4998b03 100644 --- a/docs/src/main/docbook/representations.xml +++ b/docs/src/main/docbook/representations.xml @@ -301,7 +301,7 @@ public class EntityNotFoundMapper implements ExceptionMapper<jakarta.persiste 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 response status + 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 response that response is returned. If response inside the &lit.jaxrs.WebApplicationException; is NULL the exception is being processed according to the default behaviour. From 3fdb351871a9b2965149c47a01e50d2cad0f094b Mon Sep 17 00:00:00 2001 From: Maxim Nesen Date: Fri, 8 Oct 2021 07:40:16 +0200 Subject: [PATCH 3/3] Grammar fix Signed-off-by: Maxim Nesen --- docs/src/main/docbook/representations.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/docbook/representations.xml b/docs/src/main/docbook/representations.xml index 67c4998b03..1da27e32aa 100644 --- a/docs/src/main/docbook/representations.xml +++ b/docs/src/main/docbook/representations.xml @@ -302,7 +302,7 @@ public class EntityNotFoundMapper implements ExceptionMapper<jakarta.persiste 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 response that response is returned. + 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.