Package ubic.gemma.rest.providers
Class NotFoundExceptionMapper
- java.lang.Object
- 
- ubic.gemma.rest.providers.AbstractExceptionMapper<javax.ws.rs.NotFoundException>
- 
- ubic.gemma.rest.providers.NotFoundExceptionMapper
 
 
- 
- All Implemented Interfaces:
- javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.NotFoundException>
 
 @Provider @Component public class NotFoundExceptionMapper extends AbstractExceptionMapper<javax.ws.rs.NotFoundException> This mapper ensures that raisedNotFoundExceptionthroughout the API contain well-formedResponseErrorObjectentity.Normally, this would be handled by WebApplicationExceptionMapper, but we also want to expose the stack trace in the case of a missing entity.- Author:
- poirigui
 
- 
- 
Constructor SummaryConstructors Constructor Description NotFoundExceptionMapper(io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.Response.StatusgetStatus(javax.ws.rs.NotFoundException exception)Translate the exception to an HTTPResponse.Status.protected WellComposedErrorBodygetWellComposedErrorBody(javax.ws.rs.NotFoundException exception)Obtain aWellComposedErrorBodyfor the exception.- 
Methods inherited from class ubic.gemma.rest.providers.AbstractExceptionMappergetResponseBuilder, logException, toResponse
 
- 
 
- 
- 
- 
Constructor Detail- 
NotFoundExceptionMapper@Autowired public NotFoundExceptionMapper(io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo) 
 
- 
 - 
Method Detail- 
getStatusprotected javax.ws.rs.core.Response.Status getStatus(javax.ws.rs.NotFoundException exception) Description copied from class:AbstractExceptionMapperTranslate the exception to an HTTPResponse.Status.- Specified by:
- getStatusin class- AbstractExceptionMapper<javax.ws.rs.NotFoundException>
 
 - 
getWellComposedErrorBodyprotected WellComposedErrorBody getWellComposedErrorBody(javax.ws.rs.NotFoundException exception) Description copied from class:AbstractExceptionMapperObtain aWellComposedErrorBodyfor the exception.- Overrides:
- getWellComposedErrorBodyin class- AbstractExceptionMapper<javax.ws.rs.NotFoundException>
 
 
- 
 
-