org.odata4j.producer
Interface ErrorResponseExtension

All Superinterfaces:
OExtension<ODataProducer>

public interface ErrorResponseExtension
extends OExtension<ODataProducer>

An optional extension that a producer can expose to control error responses.

To expose this extension, the producer implementation has to return an instance of this interface when method findExtension is called and the first parameter is equal to ErrorResponseExtension.class.

See Also:
ErrorResponseExtensions

Method Summary
 boolean returnInnerError(HttpHeaders httpHeaders, UriInfo uriInfo, ODataProducerException exception)
          This method is called before an error response is created and sent to the client.
 

Method Detail

returnInnerError

boolean returnInnerError(HttpHeaders httpHeaders,
                         UriInfo uriInfo,
                         ODataProducerException exception)
This method is called before an error response is created and sent to the client. Thus producers can decide if an inner error should be returned or not. This decision can be based on a system property, a query parameter, or any other data source.

Parameters:
httpHeaders - the HTTP headers of the request that led to an error
uriInfo - the URI info of the request that led to an error
exception - the exception about to be sent to the client
Returns:
flag indicating whether to return an inner error as part of the error response to the client or not


http://odata4j.org