Interface ODataErrorCallback

All Superinterfaces:
ODataCallback

public interface ODataErrorCallback extends ODataCallback
This interface is called if an error occurred and is process inside the exception mapper.
  • Method Summary

    Modifier and Type
    Method
    Description
    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 thrown ODataApplicationException will 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 the EntityProvider writeErrorDocument can be used.
      Parameters:
      context - of this error
      Returns:
      the response which will be propagated to the client
      Throws:
      ODataApplicationException