throw new UnauthorizedException("Http error " + code
+ " when executing request");
}
if (code == 403) {
throw new ForbiddenException("Http error " + code
+ " when executing request");
}
if (code == 404) {
throw new NotFoundException("Http error " + code