Interface ClientErrorHandler


  • public interface ClientErrorHandler
    The client error handler deals with errors that are due to the client doing something wrong.

    Examples:

    • Unsupported media type (415)
    • Unsupported method (405)
    • Field Detail

      • TYPE

        static final com.google.common.reflect.TypeToken<ClientErrorHandler> TYPE
        A type token for this type.
        Since:
        1.1
    • Method Detail

      • error

        void error​(Context context,
                   int statusCode)
            throws Exception
        Handle a client error.
        Parameters:
        context - The context
        statusCode - The 4xx status code that explains the problem
        Throws:
        Exception - if a problem occurs reacting to the client error (will be forwarded to the server error handler)