org.apache.olingo.odata2.jpa.processor.api.exception

## Class ODataJPAErrorCallback

- java.lang.Object
- - org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAErrorCallback

- All Implemented Interfaces:
    ODataCallback, ODataErrorCallback

      public class ODataJPAErrorCallback
      extends Object
      implements ODataErrorCallback

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ODataJPAErrorCallback()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ODataResponse` | `handleError(ODataErrorContext context)` This method can be used to handle an error differently than the exception mapper would.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ODataJPAErrorCallback

          public ODataJPAErrorCallback()

  - ### Method Detail

    - #### handleError

          public ODataResponse handleError(ODataErrorContext context)
                                    throws ODataApplicationException

      Description copied from interface: `ODataErrorCallback`
      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.
      Specified by:
        `handleError` in interface `ODataErrorCallback`
      Parameters:
        `context` - of this error
      Returns:
        the response which will be propagated to the client
      Throws:
        `ODataApplicationException`

Copyright © 2013-2023 The Apache Software Foundation. All Rights Reserved.