}
private Throwable convertApplicationException(URL requestUrl,
ApiProxy.ApplicationException ex) {
String urlString = requestUrl.toString();
ErrorCode errorCode = ErrorCode.valueOf(ex.getApplicationError());
String errorDetail = ex.getErrorDetail();
switch (errorCode) {
case INVALID_URL:
return new MalformedURLException(
getURLExceptionMessage("Invalid URL specified: %s", urlString, errorDetail));