Top Description Methods
com.oracle.bmc.http.internal

public Interface ResponseErrorRuntimeExceptionFactory<ERRMODEL, E extends SdkRuntimeException>

Known Direct Implementers
com.oracle.bmc.http.internal.ResponseErrorBmcExceptionFactory
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.
Imports
com.oracle.bmc.ServiceDetails, com.oracle.bmc.model.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 Summary

Modifier and TypeMethod and Description
public E
createRuntimeException(int statusCode, String opcRequestId, ERRMODEL errorResponse, ServiceDetails serviceDetails)

public E
createRuntimeException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails)

public E
createRuntimeException(int statusCode, String serviceCode, String message, String opcRequestId, Throwable cause, ServiceDetails serviceDetails)

public Class<ERRMODEL>

Returns:

a Class that represents the type of model in the response error, which can be used to deserialize the response content.
getResponseErrorModelType
()

Method Detail

createRuntimeExceptionback to summary
public E createRuntimeException(int statusCode, String opcRequestId, ERRMODEL errorResponse, ServiceDetails serviceDetails)
createRuntimeExceptionback to summary
public E createRuntimeException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails)
createRuntimeExceptionback to summary
public E createRuntimeException(int statusCode, String serviceCode, String message, String opcRequestId, Throwable cause, ServiceDetails serviceDetails)
getResponseErrorModelTypeback to summary
public Class<ERRMODEL> getResponseErrorModelType()
Returns:Class<ERRMODEL>

a Class that represents the type of model in the response error, which can be used to deserialize the response content.