Package ubic.gemma.rest.providers
Class UnhandledExceptionMapper
- java.lang.Object
-
- ubic.gemma.rest.providers.AbstractExceptionMapper<Throwable>
-
- ubic.gemma.rest.providers.UnhandledExceptionMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<Throwable>
@Provider @Component public class UnhandledExceptionMapper extends AbstractExceptionMapper<Throwable>
Render unhandled exceptions.The
RequestExceptionLogger
does not always work reliably, and more than often the exception is caught instead by the configured JSP error page.
-
-
Constructor Summary
Constructors Constructor Description UnhandledExceptionMapper(io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.Response.Status
getStatus(Throwable exception)
Translate the exception to an HTTPResponse.Status
.protected boolean
logException(Throwable t)
Indicate if the given exception should be logged.-
Methods inherited from class ubic.gemma.rest.providers.AbstractExceptionMapper
getResponseBuilder, getWellComposedErrorBody, toResponse
-
-
-
-
Constructor Detail
-
UnhandledExceptionMapper
@Autowired public UnhandledExceptionMapper(io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo)
-
-
Method Detail
-
getStatus
protected javax.ws.rs.core.Response.Status getStatus(Throwable exception)
Description copied from class:AbstractExceptionMapper
Translate the exception to an HTTPResponse.Status
.- Specified by:
getStatus
in classAbstractExceptionMapper<Throwable>
-
logException
protected boolean logException(Throwable t)
Description copied from class:AbstractExceptionMapper
Indicate if the given exception should be logged.- Overrides:
logException
in classAbstractExceptionMapper<Throwable>
-
-