case 404:
throw new NotFoundException(request.getRequestLine().getUri());
case 500:
throw new InternalErrorException();
default:
throw new ServerResponseException("Unknown error, status: " + statusCode + ", content: " + new String(content));
}
} catch (OAuthException e) {
throw new InternalConfigurationException("Failed to create OAuth signature", e);
} catch (IOException e) {
throw new ConnectionException("Failed to connect to BellaDati", e);