public interface ErrorResponseHandler
HttpServlet sub-classes.
The onError(HttpServletRequest, HttpServletResponse, int, Throwable)
method will be invoked whenever the runtime raises an error condition, for
example if a 401 - Unauthorized condition is raised by the
authorization infrastructure.
This provides a servlet the means to override the standard error handling and rendering logic of the runtime, and provide it's own custom behaviour.
| Modifier and Type | Method and Description |
|---|---|
boolean |
onError(HttpServletRequest request,
HttpServletResponse response,
int statusCode,
Throwable cause)
Called when the runtime is about to raise an error condition (i.e report an
HTTP status code in the 400-499 range).
|
boolean onError(HttpServletRequest request, HttpServletResponse response, int statusCode, Throwable cause) throws ServletException, IOException
request - The HttpServletRequest for the current requestresponse - The HttpServletResponse for the current responsestatusCode - The HTTP status code to be raisedcause - The cause of the error condition, may be nulltrue. If this method does not
handle the error condition this method must return
false. In which case the standard runtime's error
handling will be invokedServletExceptionIOExceptionOracle REST Data Services Plugin API version: 3.0.0.65.09.35 Copyright © 2015 Oracle Corp. All Rights Reserved.