summaryrefslogtreecommitdiff
path: root/indra/viewer_components/updater
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-03-26 18:01:20 -0400
committerOz Linden <oz@lindenlab.com>2013-03-26 18:01:20 -0400
commit8154621527171267af52a9534e541af1d6c07836 (patch)
treeb473b49aa7ea8947d14e81d4ddefb57e6e788fe6 /indra/viewer_components/updater
parente917620069ce20c30c1abb53c5ece847ee76ddba (diff)
log any error code and text received as an llsd body in a failure response
Diffstat (limited to 'indra/viewer_components/updater')
-rw-r--r--indra/viewer_components/updater/llupdatechecker.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp
index bb171aec01..daa867e692 100644
--- a/indra/viewer_components/updater/llupdatechecker.cpp
+++ b/indra/viewer_components/updater/llupdatechecker.cpp
@@ -134,6 +134,17 @@ void LLUpdateChecker::Implementation::completed(U32 status,
if(status != 200)
{
+ std::string server_error;
+ if ( content.has("error_code") )
+ {
+ server_error += content["error_code"].asString();
+ }
+ if ( content.has("error_text") )
+ {
+ server_error += server_error.empty() ? "" : ": ";
+ server_error += content["error_text"].asString();
+ }
+
if (status == 404)
{
if (mProtocol == sProtocolVersion)
@@ -143,7 +154,8 @@ void LLUpdateChecker::Implementation::completed(U32 status,
LL_WARNS("UpdaterService")
<< "update response using " << sProtocolVersion
- << " was 404... retry with legacy protocol " << mProtocol
+ << " was HTTP 404 (" << server_error
+ << "); retry with legacy protocol " << mProtocol
<< "\n at " << retryUrl
<< LL_ENDL;
@@ -153,14 +165,18 @@ void LLUpdateChecker::Implementation::completed(U32 status,
{
LL_WARNS("UpdaterService")
<< "update response using " << sLegacyProtocolVersion
- << " was 404; request failed"
+ << " was 404 (" << server_error
+ << "); request failed"
<< LL_ENDL;
mClient.error(reason);
}
}
else
{
- LL_WARNS("UpdaterService") << "response error " << status << " (" << reason << ")" << LL_ENDL;
+ LL_WARNS("UpdaterService") << "response error " << status
+ << " " << reason
+ << " (" << server_error << ")"
+ << LL_ENDL;
mClient.error(reason);
}
}