summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-09-01 16:49:35 -0700
committerMerov Linden <merov@lindenlab.com>2014-09-01 16:49:35 -0700
commit7643a0571ebd92a31ac293cea18d21a160e3d46f (patch)
treec38e8df330e3abe407f64bec021ecfb82f040990 /indra
parenta13b266a8ba50d8f7e482d84fc59f79421dba036 (diff)
DD-168 : Display an error message when SLM transactions fail
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llmarketplacefunctions.cpp41
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml16
2 files changed, 39 insertions, 18 deletions
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 090b78a6bb..c453b236cd 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -106,6 +106,12 @@ LLSD getMarketplaceStringSubstitutions()
void log_SLM_warning(const std::string& request, U32 status, const std::string& reason, const std::string& code, const std::string& description)
{
LL_WARNS("SLM") << "SLM API : Responder to " << request << ". status : " << status << ", reason : " << reason << ", code : " << code << ", description : " << description << LL_ENDL;
+ // Prompt the user with the warning (so they know why things are failing)
+ LLSD subs;
+ subs["[ERROR_REASON]"] = reason;
+ subs["[ERROR_DESCRIPTION]"] = description;
+ LLNotificationsUtil::add("MerchantTransactionFailed", subs);
+
}
void log_SLM_infos(const std::string& request, U32 status, const std::string& body)
{
@@ -177,17 +183,18 @@ public:
{
LLMarketplaceData::instance().setUpdating(mExpectedFolderId,false);
+ LLBufferStream istr(channels, buffer.get());
+ std::stringstream strstrm;
+ strstrm << istr.rdbuf();
+ const std::string body = strstrm.str();
+
if (!isGoodStatus())
{
- log_SLM_warning("Get /listings", getStatus(), getReason(), "", "");
+ log_SLM_warning("Get /listings", getStatus(), getReason(), "", body);
update_marketplace_category(mExpectedFolderId, false);
gInventory.notifyObservers();
return;
}
- LLBufferStream istr(channels, buffer.get());
- std::stringstream strstrm;
- strstrm << istr.rdbuf();
- const std::string body = strstrm.str();
Json::Value root;
Json::Reader reader;
@@ -248,19 +255,19 @@ public:
{
LLMarketplaceData::instance().setUpdating(mExpectedFolderId,false);
+ LLBufferStream istr(channels, buffer.get());
+ std::stringstream strstrm;
+ strstrm << istr.rdbuf();
+ const std::string body = strstrm.str();
+
if (!isGoodStatus())
{
- log_SLM_warning("Post /listings", getStatus(), getReason(), "", "");
+ log_SLM_warning("Post /listings", getStatus(), getReason(), "", body);
update_marketplace_category(mExpectedFolderId, false);
gInventory.notifyObservers();
return;
}
- LLBufferStream istr(channels, buffer.get());
- std::stringstream strstrm;
- strstrm << istr.rdbuf();
- const std::string body = strstrm.str();
-
Json::Value root;
Json::Reader reader;
if (!reader.parse(body,root))
@@ -463,19 +470,19 @@ public:
{
LLMarketplaceData::instance().setUpdating(mExpectedFolderId,false);
+ LLBufferStream istr(channels, buffer.get());
+ std::stringstream strstrm;
+ strstrm << istr.rdbuf();
+ const std::string body = strstrm.str();
+
if (!isGoodStatus())
{
- log_SLM_warning("Put /associate_inventory", getStatus(), getReason(), "", "");
+ log_SLM_warning("Put /associate_inventory", getStatus(), getReason(), "", body);
update_marketplace_category(mExpectedFolderId, false);
gInventory.notifyObservers();
return;
}
- LLBufferStream istr(channels, buffer.get());
- std::stringstream strstrm;
- strstrm << istr.rdbuf();
- const std::string body = strstrm.str();
-
Json::Value root;
Json::Reader reader;
if (!reader.parse(body,root))
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 02009e63e0..900ed0f77a 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -305,7 +305,21 @@ Initialization with the Marketplace failed because of a system or network error.
name="okbutton"
yestext="OK"/>
</notification>
-
+
+ <notification
+ icon="OutboxStatus_Error"
+ name="MerchantTransactionFailed"
+ type="outbox">
+ Transaction with the Marketplace failed with error :
+
+ Reason : &apos;[ERROR_REASON]&apos;
+ [ERROR_DESCRIPTION]
+
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
<notification
icon="OutboxStatus_Error"
name="MerchantListingFailed"