I think this can be replaced with:
  if (responseCode/100 != 2 ) {
      // handle error response
  }

Java handles HTTP 3xx redirects and since we have humans looking at the response, we do not need to handle retries on other failures. (like 503)