Class BaseServiceException.Error (2.37.0)

public static final class BaseServiceException.Error implements Serializable

Inheritance

Object > BaseServiceException.Error

Implements

Serializable

Constructors

Error(Integer code, String reason)

public Error(Integer code, String reason)
Parameters
Name Description
code Integer
reason String

Error(Integer code, String reason, boolean rejected)

public Error(Integer code, String reason, boolean rejected)
Parameters
Name Description
code Integer
reason String
rejected boolean

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCode()

public Integer getCode()

Returns the code associated with this exception.

Returns
Type Description
Integer

getReason()

public String getReason()

Returns the reason that caused the exception.

Returns
Type Description
String

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

isRejected()

public boolean isRejected()

Returns true if the error indicates that the API call was certainly not accepted by the server. For instance, if the server returns a rate limit exceeded error, it certainly did not process the request and this method will return true.

Returns
Type Description
boolean

isRetryable(boolean idempotent, Set<BaseServiceException.Error> retryableErrors)

public boolean isRetryable(boolean idempotent, Set<BaseServiceException.Error> retryableErrors)
Parameters
Name Description
idempotent boolean
retryableErrors Set<Error>
Returns
Type Description
boolean

toString()

public String toString()
Returns
Type Description
String
Overrides