diff options
-rw-r--r-- | indra/newview/llaisapi.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 0f58908251..4546574955 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -986,6 +986,7 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht case FETCHITEM: if (result.has("item_id")) { + // Error message might contain an item_id!!! id = result["item_id"]; } if (result.has("linked_id")) @@ -1167,11 +1168,15 @@ void AISUpdate::parseMeta(const LLSD& update) void AISUpdate::parseContent(const LLSD& update) { - if (update.has("linked_id")) + // Errors from a fetch request might contain id without + // full item or folder. + // Todo: Depending on error we might want to do something, + // like removing a 404 item or refetching parent folder + if (update.has("linked_id") && update.has("parent_id")) { parseLink(update, mFetchDepth); } - else if (update.has("item_id")) + else if (update.has("item_id") && update.has("parent_id")) { parseItem(update); } @@ -1185,7 +1190,7 @@ void AISUpdate::parseContent(const LLSD& update) parseEmbedded(update["_embedded"], mFetchDepth - 1); } } - else if (update.has("category_id")) + else if (update.has("category_id") && update.has("parent_id")) { parseCategory(update, mFetchDepth); } |