summaryrefslogtreecommitdiff
path: root/indra/newview/llaisapi.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-05-30 00:01:58 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-05-30 00:01:58 +0300
commitd42f2a1887a1bc94a97c08bfe676731672ce53d3 (patch)
treee2e60bdd0089def27a8671588992e5bd72357943 /indra/newview/llaisapi.cpp
parentb9fad316a356fd223dcf29ed000de1b86e6a93d3 (diff)
SL-17429 Message user when their inventory hits AIS3 limits
Diffstat (limited to 'indra/newview/llaisapi.cpp')
-rw-r--r--indra/newview/llaisapi.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index b09b8ec517..fcee3a3e91 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -32,11 +32,12 @@
#include "llappviewer.h"
#include "llcallbacklist.h"
#include "llinventorymodel.h"
+#include "llinventoryobserver.h"
+#include "llnotificationsutil.h"
#include "llsdutil.h"
#include "llviewerregion.h"
#include "llvoavatar.h"
#include "llvoavatarself.h"
-#include "llinventoryobserver.h"
#include "llviewercontrol.h"
///----------------------------------------------------------------------------
@@ -893,11 +894,21 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
}
}
}
- else if (status.getType() == 403)
+ else if (status == LLCore::HttpStatus(HTTP_FORBIDDEN) /*403*/)
{
if (type == FETCHCATEGORYCHILDREN)
{
- LL_DEBUGS("Inventory") << "Fetch failed, content is over imit" << LL_ENDL;
+ if (body.has("depth") && body["depth"].asInteger() == 0)
+ {
+ // Can't fetch a single folder with depth 0, folder is too big.
+ LLNotificationsUtil::add("InventoryLimitReachedAIS");
+ LL_WARNS("Inventory") << "Fetch failed, content is over limit, url: " << url << LL_ENDL;
+ }
+ else
+ {
+ // Result was too big, but situation is recoverable by requesting with lower depth
+ LL_DEBUGS("Inventory") << "Fetch failed, content is over limit, url: " << url << LL_ENDL;
+ }
}
}
LL_WARNS("Inventory") << "Inventory error: " << status.toString() << LL_ENDL;