The Free Software Media System - Server Backend & API
update http exceptions
Luke Pulverentie8d1685b7e4a
diff --git a/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Common.Implementations/HttpClientManager/HttpClientManager.csindex 5bd18cb808..700d04c4d3 100644--- a/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs+++ b/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs@@ -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;}