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:

     {
            "errorCode": 999, // The error code.
            "localizedMessage":"HTTP error 422.", // A localized message that may be displayed to end users.
            "messages":["HTTP 422 Unprocessable Entity"] // Additional messages especially useful when debugging (optional)
                                                         // Usually not displayed to end users and not localized.
     }
     
    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