Interface RestFaultProcessor


public interface RestFaultProcessor
Interface to handle faults that occur during execution of subclasses of BaseRestDriver. The purpose of the processor is to diagnose the problem and choose where or not to log it, and whether or not to throw an appropriate ConnId exception (ConnectorException or one of its subclases). In certain cases, it might be ideal to ignore the exception and just proceed normally with no exception (for Midpoint, this is often true with HTTP 404 Not found conditions).
  • Method Summary

    Modifier and Type Method Description
    void process​(org.apache.http.HttpResponse response, com.google.gson.GsonBuilder gsonBuilder)
    Process an HTTP response and handle error conditions.
  • Method Details

    • process

      void process​(org.apache.http.HttpResponse response, com.google.gson.GsonBuilder gsonBuilder) throws org.identityconnectors.framework.common.exceptions.ConnectorException
      Process an HTTP response and handle error conditions. Normally BaseRestDriver will invoke this method after it's determined the response for a web service call has resulted in a non 200-level HTTP response.
      Parameters:
      response - HTTP response object to inspect
      gsonBuilder - GsonBuilder that can be used, if needed, to read JSON response from the body if it might contain error details.
      Throws:
      org.identityconnectors.framework.common.exceptions.ConnectorException - Throw this exception or one of its more specific subclass exceptions