mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 10:29:01 -07:00
update http exceptions
This commit is contained in:
parent
b41614ac81
commit
e8d1685b7e
@ -736,10 +736,10 @@ namespace Emby.Common.Implementations.HttpClientManager
|
||||
{
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user