code: private static boolean shouldRetry(final int status, final String content) {
          switch (status) {
              case 200:
                  return false;
              case 404:
                  return analyse404Response(content);
              case 500:
                  return analyse500Response(content);
              case 300:
              case 301:
              case 302:
              case 303:
              case 307:
              case 401:
              case 408:
              case 409:
              case 412:
              case 416:
              case 417:
              case 501:
              case 502:
              case 503:
              case 504:
                  return true;
              default:
                  LOGGER.info("Received a View HTTP response code ({}) I did not expect, not retrying.", status);
                  return false;
          }
      }
docs: Analyses status codes and checks if a retry needs to happen.
  
  Some status codes are ambiguous, so their contents are inspected further.
  
  @param status the status code.
  @param content the error body from the response.
  @return true if retry is needed, false otherwise.