Ensure we throw
when torrentio/knightcrawler instances return invalid status codes on fetch requests for json payloads, pre-parsing of json, polly will catch in the policy wrapped resiliency handler
This commit is contained in:
@@ -155,8 +155,7 @@ public partial class TorrentioCrawler(
|
||||
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
logger.LogError("Failed to fetch {Url}", requestUrl);
|
||||
return null;
|
||||
throw new("Failed to fetch " + requestUrl);
|
||||
}
|
||||
|
||||
var json = JsonDocument.Parse(await response.Content.ReadAsStringAsync());
|
||||
|
||||
Reference in New Issue
Block a user