throw new ClientException("Http error " + code
+ " when executing request");
}
if (code == 501) {
throw new NotImplementedException("Http error " + code
+ " when executing request");
}
if (code == 500 || (code >= 502 && code <= 599)) {
throw new ServerException("Http error " + code