-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: coretriage meI really want to be triaged.I really want to be triaged.
Description
In DefaultStorageRpc (and also other services as DefaultBigQueryRpc) we have code handling the translation of IOException to service specific exceptions:
private static BigQueryException translate(IOException exception) {
BigQueryException translated;
if (exception instanceof GoogleJsonResponseException
&& ((GoogleJsonResponseException) exception).getDetails() != null) {
translated = translate(((GoogleJsonResponseException) exception).getDetails());
} else {
translated =
new BigQueryException(BigQueryException.UNKNOWN_CODE, exception.getMessage(), false);
}
translated.initCause(exception);
return translated;
}
private static BigQueryException translate(GoogleJsonError exception) {
boolean retryable = RETRYABLE_CODES.contains(exception.getCode());
return new BigQueryException(exception.getCode(), exception.getMessage(), retryable);
}Part of this logic should be moved to BaseServiceException
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: coretriage meI really want to be triaged.I really want to be triaged.