mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-26 23:06:43 -04:00
Fixed: (Indexers) Hide errors with SuppressHttpErrorStatusCodes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user