summaryrefslogtreecommitdiff
path: root/indra/newview/llmarketplacefunctions.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-04-19 16:02:48 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-04-19 16:02:48 -0400
commitde5cbddf7918c45c46a1c3a569bdb1adaf3dde06 (patch)
tree35a11fbfffc2d4e01d2f1f7450ea62614fc48919 /indra/newview/llmarketplacefunctions.cpp
parent8d12ef71a0de00f7bb3ecce61b7fe3a84bda1b88 (diff)
parentf62b5503285d828813d87779fa0658ee5f122ac5 (diff)
merge
Diffstat (limited to 'indra/newview/llmarketplacefunctions.cpp')
-rw-r--r--indra/newview/llmarketplacefunctions.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 54f95520db..a0e19f2d19 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -121,7 +121,6 @@ namespace {
{
// Prompt the user with the warning (so they know why things are failing)
LLSD subs;
- subs["[ERROR_REASON]"] = reason;
// We do show long descriptions in the alert (unlikely to be readable). The description string will be in the log though.
std::string description;
if (result.has(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_CONTENT))
@@ -145,6 +144,16 @@ namespace {
{
description = result.asString();
}
+ std::string reason_lc = reason;
+ LLStringUtil::toLower(reason_lc);
+ if (!description.empty() && reason_lc.find("unknown") != std::string::npos)
+ {
+ subs["[ERROR_REASON]"] = "";
+ }
+ else
+ {
+ subs["[ERROR_REASON]"] = "'" + reason +"'\n";
+ }
subs["[ERROR_DESCRIPTION]"] = description;
LLNotificationsUtil::add("MerchantTransactionFailed", subs);
}