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 boolean
equals(Object obj)
Integer
getCode()
Returns the code associated with this exception.String
getReason()
Returns the reason that caused the exception.int
hashCode()
boolean
isRejected()
Returns true if the error indicates that the API call was certainly not accepted by the server.boolean
isRetryable(boolean idempotent, Set<BaseServiceException.Error> retryableErrors)
String
toString()
-
-
-
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)
-
-