Package com.oracle.bmc.http.internal
Interface ResponseErrorRuntimeExceptionFactory<ERRMODEL,E extends SdkRuntimeException>
-
- Type Parameters:
ERRMODEL
- The model type that represents the model in the response error.E
- ASdkRuntimeException
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 aSdkRuntimeException
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description E
createRuntimeException(int statusCode, String opcRequestId, ERRMODEL errorResponse, ServiceDetails serviceDetails)
E
createRuntimeException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails)
E
createRuntimeException(int statusCode, String serviceCode, String message, String opcRequestId, Throwable cause, ServiceDetails serviceDetails)
Class<ERRMODEL>
getResponseErrorModelType()
-
-
-
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)
-
createRuntimeException
E createRuntimeException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails)
-
-