mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 08:45:23 +03:00
update http exceptions
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user