Class ApiExceptionFactory (2.48.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
Name Description
message String
cause Throwable
statusCode StatusCode
retryable boolean
Returns
Type Description
ApiException

createException(Throwable cause, StatusCode statusCode, boolean retryable)

public static ApiException createException(Throwable cause, StatusCode statusCode, boolean retryable)
Parameters
Name Description
cause Throwable
statusCode StatusCode
retryable boolean
Returns
Type Description
ApiException

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

public static ApiException createException(Throwable cause, StatusCode statusCode, boolean retryable, ErrorDetails errorDetails)
Parameters
Name Description
cause Throwable
statusCode StatusCode
retryable boolean
errorDetails ErrorDetails
Returns
Type Description
ApiException