Package ratpack.core.error
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 Summary
Fields Modifier and Type Field Description static com.google.common.reflect.TypeToken<ClientErrorHandler>
TYPE
A type token for this type.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
error(Context context, int statusCode)
Handle a client error.
-
-
-
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 contextstatusCode
- 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)
-
-