Distinguish 404 errors in RestClient.Request().

Mantis #3225.
GenericGridServerConcept
Mike Mazur 2009-02-25 02:14:19 +00:00
parent bdf95e54a2
commit 72be38f7ae
1 changed files with 10 additions and 2 deletions

View File

@ -293,8 +293,16 @@ namespace OpenSim.Framework.Communications
}
catch (WebException e)
{
m_log.ErrorFormat("[ASSET] Error fetching asset from asset server");
m_log.Debug(e.ToString());
HttpWebResponse errorResponse = e.Response as HttpWebResponse;
if (null != errorResponse && HttpStatusCode.NotFound == errorResponse.StatusCode)
{
m_log.Warn("[ASSET] Asset not found (404)");
}
else
{
m_log.Error("[ASSET] Error fetching asset from asset server");
m_log.Debug(e.ToString());
}
return null;
}