1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-03-04 10:48:26 +00:00

mejortorrent: dont dump the whole html into the error message when status=500

This commit is contained in:
Garfield69 2024-08-29 06:28:15 +12:00
parent 5857f00b0d
commit f61401069c

View file

@ -153,7 +153,16 @@ namespace Jackett.Common.Indexers.Definitions
var url = SiteLink + NewTorrentsUrl;
var result = await RequestWithCookiesAsync(url);
if (result.Status != HttpStatusCode.OK)
{
if (result.Status == HttpStatusCode.InternalServerError)
{
throw new ExceptionWithConfigData("HTTP 500 Internal Server Error", configData);
}
else
{
throw new ExceptionWithConfigData(result.ContentString, configData);
}
}
try
{
var searchResultParser = new HtmlParser();
@ -207,7 +216,14 @@ namespace Jackett.Common.Indexers.Definitions
var url = SiteLink + SearchUrl + i + "?" + qc.GetQueryString();
var result = await RequestWithCookiesAsync(url);
if (result.Status != HttpStatusCode.OK)
if (result.Status == HttpStatusCode.InternalServerError)
{
throw new ExceptionWithConfigData("HTTP 500 Internal Server Error", configData);
}
else
{
throw new ExceptionWithConfigData(result.ContentString, configData);
}
try
{
var searchResultParser = new HtmlParser();