mirror of https://github.com/Jackett/Jackett
mejortorrent: dont dump the whole html into the error message when status=500
This commit is contained in:
parent
5857f00b0d
commit
f61401069c
|
@ -153,7 +153,16 @@ namespace Jackett.Common.Indexers.Definitions
|
||||||
var url = SiteLink + NewTorrentsUrl;
|
var url = SiteLink + NewTorrentsUrl;
|
||||||
var result = await RequestWithCookiesAsync(url);
|
var result = await RequestWithCookiesAsync(url);
|
||||||
if (result.Status != HttpStatusCode.OK)
|
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);
|
throw new ExceptionWithConfigData(result.ContentString, configData);
|
||||||
|
}
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var searchResultParser = new HtmlParser();
|
var searchResultParser = new HtmlParser();
|
||||||
|
@ -207,7 +216,14 @@ namespace Jackett.Common.Indexers.Definitions
|
||||||
var url = SiteLink + SearchUrl + i + "?" + qc.GetQueryString();
|
var url = SiteLink + SearchUrl + i + "?" + qc.GetQueryString();
|
||||||
var result = await RequestWithCookiesAsync(url);
|
var result = await RequestWithCookiesAsync(url);
|
||||||
if (result.Status != HttpStatusCode.OK)
|
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);
|
throw new ExceptionWithConfigData(result.ContentString, configData);
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var searchResultParser = new HtmlParser();
|
var searchResultParser = new HtmlParser();
|
||||||
|
|
Loading…
Reference in New Issue