Class ApiExceptionFactory (2.22.0)

public class ApiExceptionFactory

A factory class that returns the corresponding type of exception class from the given status code.

Inheritance

java.lang.Object > ApiExceptionFactory

Static Methods

createException(String message, Throwable cause, StatusCode statusCode, boolean retryable)

public static ApiException createException(String message, Throwable cause, StatusCode statusCode, boolean retryable)
Parameters
NameDescription
messageString
causeThrowable
statusCodeStatusCode
retryableboolean
Returns
TypeDescription
ApiException

createException(Throwable cause, StatusCode statusCode, boolean retryable)

public static ApiException createException(Throwable cause, StatusCode statusCode, boolean retryable)
Parameters
NameDescription
causeThrowable
statusCodeStatusCode
retryableboolean
Returns
TypeDescription
ApiException

createException(Throwable cause, StatusCode statusCode, boolean retryable, ErrorDetails errorDetails)

public static ApiException createException(Throwable cause, StatusCode statusCode, boolean retryable, ErrorDetails errorDetails)
Parameters
NameDescription
causeThrowable
statusCodeStatusCode
retryableboolean
errorDetailsErrorDetails
Returns
TypeDescription
ApiException