diff --git a/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetParser.cs b/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetParser.cs index 3b8d6fe44..35b2ed8f1 100644 --- a/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetParser.cs +++ b/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetParser.cs @@ -32,7 +32,13 @@ public IList ParseResponse(IndexerResponse indexerResponse) break; } - var jsonResponse = new HttpResponse>(indexerResponse.HttpResponse).Resource; + if (indexerResponse.Content == "Query execution was interrupted") + { + throw new IndexerException(indexerResponse, "Indexer API returned an internal server error"); + } + + + JsonRpcResponse jsonResponse = new HttpResponse>(indexerResponse.HttpResponse).Resource; if (jsonResponse.Error != null || jsonResponse.Result == null) { diff --git a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs index 5c3eb3e6d..f7713faa8 100644 --- a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs @@ -306,13 +306,19 @@ protected virtual ValidationFailure TestConnection() } catch (UnsupportedFeedException ex) { - _logger.WarnException("Indexer feed is not supported: " + ex.Message, ex); + _logger.WarnException("Indexer feed is not supported", ex); return new ValidationFailure(string.Empty, "Indexer feed is not supported: " + ex.Message); } + catch (IndexerException ex) + { + _logger.WarnException("Unable to connect to indexer", ex); + + return new ValidationFailure(string.Empty, "Unable to connect to indexer. " + ex.Message); + } catch (Exception ex) { - _logger.WarnException("Unable to connect to indexer: " + ex.Message, ex); + _logger.WarnException("Unable to connect to indexer", ex); return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log for more details"); }