Package org.kiwiproject.jaxrs.exception
Class IllegalStateExceptionMapper
java.lang.Object
org.kiwiproject.jaxrs.exception.IllegalStateExceptionMapper
- All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<IllegalStateException>
@Provider
public class IllegalStateExceptionMapper
extends Object
implements jakarta.ws.rs.ext.ExceptionMapper<IllegalStateException>
Map
IllegalStateException to Response.
The mapped response has status code 500 (Internal Server Error) and media type JSON.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsetoResponse(IllegalStateException exception) Convert the givenIllegalStateExceptionto a 500 Internal Server Error response containing a JSON entity.
-
Constructor Details
-
IllegalStateExceptionMapper
public IllegalStateExceptionMapper()
-
-
Method Details
-
toResponse
Convert the givenIllegalStateExceptionto a 500 Internal Server Error response containing a JSON entity.- Specified by:
toResponsein interfacejakarta.ws.rs.ext.ExceptionMapper<IllegalStateException>- Parameters:
exception- the exception to convert- Returns:
- a response
- See Also:
-