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:
iPromKnight
2024-03-03 19:30:06 +00:00
parent 5dd53de40c
commit 62decbf994

View File

@@ -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());