Logging errors with the same exception type
Your log output shouldn't also be detailing the code that failed, because the JVM is going to generate a more detailed stacktrace, and you should print that instead.

LOGGER.error("..." + url, e);


Instead, it will be more beneficial to give a more descriptive message. Borrowing your original code...

try {
       connection = (HttpURLConnection) url.openConnection(proxy);
} catch (IOException e) {
       LOGGER.error("Unable to open a connection to " + proxy, e);
}
int responseCode = -1;
try {
       responseCode = connection.getResponseCode();
} catch (IOException e) {
       LOGGER.error("Could not get response code from " + proxy, e);
}