Interface ResponseErrorRuntimeExceptionFactory<ERRMODEL,​E extends SdkRuntimeException>

  • Type Parameters:
    ERRMODEL - The model type that represents the model in the response error.
    E - A SdkRuntimeException to be created by the “create exception” methods.
    All Known Implementing Classes:
    ResponseErrorBmcExceptionFactory

    public interface ResponseErrorRuntimeExceptionFactory<ERRMODEL,​E extends SdkRuntimeException>
    Factory interface that defines the model type of a response error (used for deserializing a response error), as well as how to create a SdkRuntimeException that allows access to that deserialized error.

    This factory allows client code to inject their own error handling code, complete with their own error model and SdkRuntimeException implementation to pass on that information in the deserialized response.

    • Method Detail

      • getResponseErrorModelType

        Class<ERRMODEL> getResponseErrorModelType()
        Returns:
        a Class that represents the type of model in the response error, which can be used to deserialize the response content.
      • createRuntimeException

        E createRuntimeException​(int statusCode,
                                 String opcRequestId,
                                 ERRMODEL errorResponse,
                                 ServiceDetails serviceDetails)