Class UnprocessableEntityException

  • All Implemented Interfaces:
    Serializable

    public final class UnprocessableEntityException
    extends LocalizedException
    A runtime exception indicating that the request was understood and the syntax was correct but that the server was unable to process the contained instructions. For example, this may occur if data validation failed.

    This exception will always report an HTTP error status 422.

    If the response uses JSON format, content will have the following form:

     {
       "code": 999,                      // JSON Number, HTTP error code or EBX® error code
                                         // in case of HTTP error 422 (optional)
       "errors": [                       // Additional messages to give details (optional).
         {
           "message": "Message 1"        // JSON String
         },
         {
           "message": "Message 2"
         }
       ]
     }
     
    Since:
    5.9.0
    • Field Detail

      • HTTP_SC_UNPROCESSABLE_ENTITY

        public static final int HTTP_SC_UNPROCESSABLE_ENTITY
        HTTP status code for Unprocessable Entity Error.

        This status code is mainly used to report functional errors.

        See Also:
        Constant Field Values