public IndexerErrorCodeException(NewznabXmlError response) { super(String.format("Indexer returned with error code %s and description %s", response.getCode(), response.getDescription())); } }
protected void handleRssError(NewznabXmlError response, String url) throws IndexerAccessException { if (Stream.of("100", "101", "102").anyMatch(x -> x.equals(response.getCode())) && !(response.getDescription() != null && response.getDescription().contains("Hits Limit Reached"))) { throw new IndexerAuthException(String.format("Indexer refused authentication. Error code: %s. Description: %s", response.getCode(), response.getDescription())); } if (Stream.of("200", "201", "202", "203").anyMatch(x -> x.equals(response.getCode()))) { throw new IndexerProgramErrorException(String.format("Indexer returned error code %s and description '%s' when URL %s was called", response.getCode(), response.getDescription(), url)); } throw new IndexerErrorCodeException(response); }
logger.debug("Checking connection to indexer {} using URI {}", indexerConfig.getName(), uri); if (xmlResponse instanceof NewznabXmlError) { logger.warn("Connection check with indexer {} failed with message: {}", indexerConfig.getName(), ((NewznabXmlError) xmlResponse).getDescription()); return GenericResponse.notOk("Indexer returned message: " + ((NewznabXmlError) xmlResponse).getDescription());
String errorDescription = ((NewznabXmlError) response).getDescription(); if (errorDescription.toLowerCase().contains("function not available") || errorDescription.toLowerCase().contains("does not support the requested query")) { logger.error("Indexer {} reports that it doesn't support the ID type {}", request.indexerConfig.getName(), request.getKey());