Class JsonParseExceptionMapper

  • All Implemented Interfaces:
    javax.ws.rs.ext.ExceptionMapper<JsonParseException>

    @Provider
    public class JsonParseExceptionMapper
    extends java.lang.Object
    implements javax.ws.rs.ext.ExceptionMapper<JsonParseException>
    Implementation of ExceptionMapper to send down a "400 Bad Request" in the event unparsable JSON is received.
    • Constructor Detail

      • JsonParseExceptionMapper

        public JsonParseExceptionMapper()
    • Method Detail

      • toResponse

        public javax.ws.rs.core.Response toResponse​(JsonParseException exception)
        Specified by:
        toResponse in interface javax.ws.rs.ext.ExceptionMapper<JsonParseException>