1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-17 21:26:22 -04:00

Added more sensible error for BTN html response.

This commit is contained in:
Taloth Saldono
2017-02-15 20:40:11 +01:00
parent 6b117427f8
commit adc79f0eba

View File

@@ -32,6 +32,11 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
break;
}
if (indexerResponse.HttpResponse.Headers.ContentType != null && indexerResponse.HttpResponse.Headers.ContentType.Contains("text/html"))
{
throw new IndexerException(indexerResponse, "Indexer responded with html content. Site is likely blocked or unavailable.");
}
if (indexerResponse.Content == "Query execution was interrupted")
{
throw new IndexerException(indexerResponse, "Indexer API returned an internal server error");