Package com.google.cloud
Class BaseServiceException.Error
- java.lang.Object
-
- com.google.cloud.BaseServiceException.Error
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- BaseServiceException
@InternalApi public static final class BaseServiceException.Error extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)IntegergetCode()Returns the code associated with this exception.StringgetReason()Returns the reason that caused the exception.inthashCode()booleanisRejected()Returns true if the error indicates that the API call was certainly not accepted by the server.booleanisRetryable(boolean idempotent, Set<BaseServiceException.Error> retryableErrors)StringtoString()
-
-
-
Method Detail
-
getCode
public Integer getCode()
Returns the code associated with this exception.
-
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 returntrue.
-
getReason
public String getReason()
Returns the reason that caused the exception.
-
isRetryable
@InternalApi public boolean isRetryable(boolean idempotent, Set<BaseServiceException.Error> retryableErrors)
-
-