Class CurationCommitConflictExceptionMapper
java.lang.Object
ubic.gemma.rest.providers.AbstractExceptionMapper<CurationCommitConflictException>
ubic.gemma.rest.providers.CurationCommitConflictExceptionMapper
- All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<CurationCommitConflictException>
@Provider
@Component
public class CurationCommitConflictExceptionMapper
extends AbstractExceptionMapper<CurationCommitConflictException>
Maps a
CurationCommitConflictException to a 409 whose errors[0].reason is the stable code for
which conflict it was, so a client routes on the code rather than on the wording of the message.
More specific than WebApplicationExceptionMapper, which would otherwise answer for it and emit the
status alone.
- Author:
- gemma
-
Field Summary
Fields inherited from class AbstractExceptionMapper
log -
Constructor Summary
ConstructorsConstructorDescriptionCurationCommitConflictExceptionMapper(String hostUrl, Future<io.swagger.v3.oas.models.OpenAPI> spec, BuildInfo buildInfo) -
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.ws.rs.core.Response.StatusgetStatus(CurationCommitConflictException exception) Translate the exception to an HTTPResponse.Status.protected WellComposedErrorBodyObtain aWellComposedErrorBodyfor the exception.Methods inherited from class AbstractExceptionMapper
getResponseBuilder, toResponse
-
Constructor Details
-
CurationCommitConflictExceptionMapper
-
-
Method Details
-
getStatus
Description copied from class:AbstractExceptionMapperTranslate the exception to an HTTPResponse.Status.- Specified by:
getStatusin classAbstractExceptionMapper<CurationCommitConflictException>
-
getWellComposedErrorBody
Description copied from class:AbstractExceptionMapperObtain aWellComposedErrorBodyfor the exception.- Overrides:
getWellComposedErrorBodyin classAbstractExceptionMapper<CurationCommitConflictException>
-