Fixed: (Indexers) Hide errors with SuppressHttpErrorStatusCodes

This commit is contained in:
Bogdan
2023-04-23 06:56:24 +03:00
parent 43f881c442
commit d2ba52cdce
4 changed files with 8 additions and 8 deletions
+3 -1
View File
@@ -118,12 +118,14 @@ namespace NzbDrone.Core.History
public void Handle(IndexerQueryEvent message)
{
var response = message.QueryResult.Response;
var history = new History
{
Date = DateTime.UtcNow,
IndexerId = message.IndexerId,
EventType = message.Query.IsRssSearch ? HistoryEventType.IndexerRss : HistoryEventType.IndexerQuery,
Successful = message.QueryResult.Response?.StatusCode == HttpStatusCode.OK
Successful = response?.StatusCode == HttpStatusCode.OK || (response is { Request: { SuppressHttpError: true, SuppressHttpErrorStatusCodes: not null } } && response.Request.SuppressHttpErrorStatusCodes.Contains(response.StatusCode))
};
if (message.Query is MovieSearchCriteria)