update http exceptions
This commit is contained in:
parent
b41614ac81
commit
e8d1685b7e
|
@ -736,10 +736,10 @@ namespace Emby.Common.Implementations.HttpClientManager
|
||||||
{
|
{
|
||||||
if (options.LogErrors)
|
if (options.LogErrors)
|
||||||
{
|
{
|
||||||
_logger.ErrorException("Error getting response from " + options.Url, ex);
|
_logger.ErrorException("Error " + webException.Status + " getting response from " + options.Url, webException);
|
||||||
}
|
}
|
||||||
|
|
||||||
var exception = new HttpException(ex.Message, ex);
|
var exception = new HttpException(webException.Message, webException);
|
||||||
|
|
||||||
var response = webException.Response as HttpWebResponse;
|
var response = webException.Response as HttpWebResponse;
|
||||||
if (response != null)
|
if (response != null)
|
||||||
|
@ -752,6 +752,15 @@ namespace Emby.Common.Implementations.HttpClientManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!exception.StatusCode.HasValue)
|
||||||
|
{
|
||||||
|
if (webException.Status == WebExceptionStatus.NameResolutionFailure ||
|
||||||
|
webException.Status == WebExceptionStatus.ConnectFailure)
|
||||||
|
{
|
||||||
|
exception.IsTimedOut = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return exception;
|
return exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user