message = conn.getResponseMessage();
}
String details = readErrorStream(conn);
log.error("URL: " + url.toExternalForm() + ". error stream: " + details);
log.error("Code: " + code + ". " + message);
HttpResponseException exc = new HttpResponseException(code);
throw exc;
}
}
return conn;
}