From 72be38f7ae94a954a451f37d44e2e1b1341ff4dd Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Wed, 25 Feb 2009 02:14:19 +0000 Subject: Distinguish 404 errors in RestClient.Request(). Mantis #3225. --- OpenSim/Framework/Communications/RestClient.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs index 69932fc..3035da5 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient.cs @@ -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; } -- cgit v1.1