return new InternalTransientException(urlString);
case DEADLINE_EXCEEDED:
return new SocketTimeoutException(getURLExceptionMessage(
"Timeout while fetching URL: %s", urlString, null));
case SSL_CERTIFICATE_ERROR:
return new SSLHandshakeException(getURLExceptionMessage(
"Could not verify SSL certificate for URL: %s", urlString, null));
case UNSPECIFIED_ERROR:
default:
return new IOException(ex.getErrorDetail());
}