make some web request errors visible, so cause of later asset not found is clear

0.9.0-post-fixes
UbitUmarov 2017-06-12 13:29:14 +01:00
parent 617f42bcfa
commit 70be8ba6de
1 changed files with 13 additions and 7 deletions

View File

@ -1262,18 +1262,24 @@ namespace OpenSim.Framework
{
if (hwr.StatusCode == HttpStatusCode.NotFound)
return deserial;
if (hwr.StatusCode == HttpStatusCode.Unauthorized)
{
m_log.Error(string.Format(
"[SynchronousRestObjectRequester]: Web request {0} requires authentication ",
requestUrl));
return deserial;
m_log.ErrorFormat("[SynchronousRestObjectRequester]: Web request {0} requires authentication",
requestUrl);
}
else
{
m_log.WarnFormat("[SynchronousRestObjectRequester]: Web request {0} returned error: {1}",
requestUrl, hwr.StatusCode);
}
}
else
m_log.Error(string.Format(
"[SynchronousRestObjectRequester]: WebException for {0} {1} {2} ",
verb, requestUrl, typeof(TResponse).ToString()), e);
m_log.ErrorFormat(
"[SynchronousRestObjectRequester]: WebException for {0} {1} {2} {3}",
verb, requestUrl, typeof(TResponse).ToString(), e.Message);
return deserial;
}
}
catch (System.InvalidOperationException)