CurlHelper: FailOnError

This commit is contained in:
kaso17 2016-12-10 12:54:14 +01:00
parent c3033db8fb
commit 0fd925e945
1 changed files with 2 additions and 1 deletions

View File

@ -93,6 +93,7 @@ namespace Jackett
easy.UserAgent = BrowserUtil.ChromeUserAgent;
easy.FollowLocation = false;
easy.ConnectTimeout = 20;
easy.FailOnError = true;
if(curlRequest.Headers != null)
{
CurlSlist curlHeaders = new CurlSlist();
@ -162,7 +163,7 @@ namespace Jackett
if (easy.LastErrorCode != CurlCode.Ok)
{
var message = "Error " + easy.LastErrorCode.ToString() + " " + easy.LastErrorDescription;
var message = "Error " + easy.LastErrorCode.ToString() + " " + easy.LastErrorDescription + " " + easy.ErrorBuffer;
if (null != OnErrorMessage)
OnErrorMessage(message);
else