Merge pull request #109 from iPromKnight/hotfix-throw-on-invalid-status-code

Ensure we throw
This commit is contained in:
iPromKnight
2024-03-03 19:30:29 +00:00
committed by GitHub

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