protected void throwOnHttpErrors(int statusCode, String statusMessage, URL requestUrl)
throws DeltaCloudClientException {
if (HttpStatusCode.OK.isStatus(statusCode)) {
return;
} else if (HttpStatusCode.UNAUTHORIZED.isStatus(statusCode)) {
throw new DeltaCloudAuthClientException(
MessageFormat.format("The server reported an authorization error \"{0}\" on requesting \"{1}\"",
statusMessage, requestUrl));
} else if (HttpStatusCode.NOT_FOUND.isStatus(statusCode)) {
throw new DeltaCloudNotFoundClientException(MessageFormat.format(
"The server could not find the resource \"{0}\"",