Class UnknownQueryParameterExceptionMapper
java.lang.Object
ubic.gemma.rest.providers.AbstractExceptionMapper<UnknownQueryParameterException>
ubic.gemma.rest.providers.UnknownQueryParameterExceptionMapper
- All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<UnknownQueryParameterException>
@Provider
@Component
public class UnknownQueryParameterExceptionMapper
extends AbstractExceptionMapper<UnknownQueryParameterException>
Maps an
UnknownQueryParameterException to a 400 whose errors[] carries one entry per rejected
parameter, each naming the parameter in location with locationType LocationType.QUERY.
More specific than MalformedArgExceptionMapper (the exception extends MalformedArgException), so
JAX-RS mapper selection picks this one and the parameter names survive into the body.
- Author:
- gemma
-
Field Summary
Fields inherited from class AbstractExceptionMapper
log -
Constructor Summary
ConstructorsConstructorDescriptionUnknownQueryParameterExceptionMapper(String hostUrl, Future<io.swagger.v3.oas.models.OpenAPI> spec, BuildInfo buildInfo) -
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.ws.rs.core.Response.StatusgetStatus(UnknownQueryParameterException exception) Translate the exception to an HTTPResponse.Status.protected WellComposedErrorBodyObtain aWellComposedErrorBodyfor the exception.Methods inherited from class AbstractExceptionMapper
getResponseBuilder, toResponse
-
Constructor Details
-
UnknownQueryParameterExceptionMapper
-
-
Method Details
-
getStatus
Description copied from class:AbstractExceptionMapperTranslate the exception to an HTTPResponse.Status.- Specified by:
getStatusin classAbstractExceptionMapper<UnknownQueryParameterException>
-
getWellComposedErrorBody
Description copied from class:AbstractExceptionMapperObtain aWellComposedErrorBodyfor the exception.- Overrides:
getWellComposedErrorBodyin classAbstractExceptionMapper<UnknownQueryParameterException>
-