From 48234062297693ce659a527746bb8491fb6b70bd Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 11 Jun 2025 02:32:51 -0700 Subject: [PATCH] chore: don't fail missionInventoryUpdate on unknown items (#2144) It's possible we started a mission, deleted an item in the webui, and then finished it. The mission completion is still valid, we just can't update that item. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2144 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/services/inventoryService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 6060f1e9..5194f771 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -1525,7 +1525,8 @@ export const applyClientEquipmentUpdates = ( gearArray.forEach(({ ItemId, XP, InfestationDate }) => { const item = category.id(fromOid(ItemId)); if (!item) { - throw new Error(`No item with id ${fromOid(ItemId)} in ${categoryName}`); + logger.warn(`Skipping unknown ${categoryName} item: id ${fromOid(ItemId)} not found`); + return; } if (XP) {