Interface ODataErrorCallback
- All Superinterfaces:
ODataCallback
This interface is called if an error occurred and is process inside the exception mapper.
-
Method Summary
Modifier and TypeMethodDescriptionhandleError(ODataErrorContext context) This method can be used to handle an error differently than the exception mapper would.
-
Method Details
-
handleError
This method can be used to handle an error differently than the exception mapper would.
Any returned Response will be directly transported to the client.
Any thrownODataApplicationExceptionwill be transformed into the OData error format.
Any thrown runtime exception will result in an 500 Internal Server error with the Text: "Exception during error handling occurred!" No OData formatting will be applied.
To serialize an error into the OData format theEntityProviderwriteErrorDocument can be used.- Parameters:
context- of this error- Returns:
- the response which will be propagated to the client
- Throws:
ODataApplicationException
-