catch (QueryResultParseException e) {
throw new RepositoryException("Malformed query result from server", e);
}
}
else if (httpCode == HttpURLConnection.HTTP_UNAUTHORIZED) {
throw new UnauthorizedException();
}
else {
ErrorInfo errInfo = getErrorInfo(method);
// Throw appropriate exception