Package org.kiwiproject.jaxrs.exception
Class IllegalArgumentExceptionMapper
- java.lang.Object
-
- org.kiwiproject.jaxrs.exception.IllegalArgumentExceptionMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<IllegalArgumentException>
@Provider public class IllegalArgumentExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<IllegalArgumentException>
MapIllegalArgumentExceptiontoResponse.The mapped response has status code 400 (Bad Request) and media type JSON.
-
-
Constructor Summary
Constructors Constructor Description IllegalArgumentExceptionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsetoResponse(IllegalArgumentException exception)Convert the givenIllegalArgumentExceptionto a 400 Bad Request response containing a JSON entity.
-
-
-
Method Detail
-
toResponse
public javax.ws.rs.core.Response toResponse(IllegalArgumentException exception)
Convert the givenIllegalArgumentExceptionto a 400 Bad Request response containing a JSON entity.- Specified by:
toResponsein interfacejavax.ws.rs.ext.ExceptionMapper<IllegalArgumentException>- Parameters:
exception- the exception to convert- Returns:
- a response
- See Also:
JaxrsExceptionMapper.buildResponse(JaxrsException)
-
-