mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-03-05 15:15:59 +02:00
Warning message when BTN API throw internal server error
This commit is contained in:
parent
9cc8ed545f
commit
e8d6d62fba
@ -32,7 +32,13 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
|
||||
break;
|
||||
}
|
||||
|
||||
var jsonResponse = new HttpResponse<JsonRpcResponse<BroadcastheNetTorrents>>(indexerResponse.HttpResponse).Resource;
|
||||
if (indexerResponse.Content == "Query execution was interrupted")
|
||||
{
|
||||
throw new IndexerException(indexerResponse, "Indexer API returned an internal server error");
|
||||
}
|
||||
|
||||
|
||||
JsonRpcResponse<BroadcastheNetTorrents> jsonResponse = new HttpResponse<JsonRpcResponse<BroadcastheNetTorrents>>(indexerResponse.HttpResponse).Resource;
|
||||
|
||||
if (jsonResponse.Error != null || jsonResponse.Result == null)
|
||||
{
|
||||
|
@ -306,13 +306,19 @@ namespace NzbDrone.Core.Indexers
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user