partis: handle internal server error

when partis is offline  we currently get this obscure error:
Exception (partis): Cannot perform runtime binding on a null reference
now we get:
Exception (partis): Partis is offline, returning an Internal server error
This commit is contained in:
Garfield69 2023-02-01 17:50:47 +13:00
parent d529b340ea
commit 24d4198e59
1 changed files with 2 additions and 1 deletions

View File

@ -175,7 +175,8 @@ namespace Jackett.Common.Indexers
// get results and follow redirect
results = await RequestWithCookiesAsync(searchUrl, referer: SearchUrl, headers: header);
if (results.ContentString.Contains("Internal server error"))
throw new Exception("Partis is offline, returning an Internal server error");
// parse results
try
{