code: static boolean isErrorStatus(HttpResponse httpResponse, HttpResponseDecodeData decodeData) {
          final int[] expectedStatuses = decodeData.expectedStatusCodes();
          if (expectedStatuses != null) {
              return !contains(expectedStatuses, httpResponse.statusCode());
          } else {
              return httpResponse.statusCode() / 100 != 2;
          }
      }
docs: Checks the response status code is considered as error.
  
  @param httpResponse the response to check
  @param decodeData the response metadata
  @return true if the response status code is considered as error, false otherwise.