From f018ce36a1b8adf7303425d318a861ffd2660ea0 Mon Sep 17 00:00:00 2001 From: SmithThe4th Date: Tue, 13 Jan 2026 14:38:56 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"[PM-28455]=20Fix=20vault=20breaking?= =?UTF-8?q?=20when=20collection=20name=20decryption=20fails=20(=E2=80=A6"?= =?UTF-8?q?=20(#18343)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 20974f8195b0f564ff7a0b6c3d67aebefd8acf71. --- .../collections/models/collection-admin.view.ts | 2 +- .../src/common/collections/models/collection.view.ts | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/libs/admin-console/src/common/collections/models/collection-admin.view.ts b/libs/admin-console/src/common/collections/models/collection-admin.view.ts index 4e4ebae964e..d5effaad3aa 100644 --- a/libs/admin-console/src/common/collections/models/collection-admin.view.ts +++ b/libs/admin-console/src/common/collections/models/collection-admin.view.ts @@ -121,13 +121,13 @@ export class CollectionAdminView extends CollectionView { try { view.name = await encryptService.decryptString(new EncString(view.name), orgKey); } catch (e) { - view.name = "[error: cannot decrypt]"; // Note: This should be replaced by the owning team with appropriate, domain-specific behavior. // eslint-disable-next-line no-console console.error( "[CollectionAdminView/fromCollectionAccessDetails] Error decrypting collection name", e, ); + throw e; } view.assigned = collection.assigned; view.readOnly = collection.readOnly; diff --git a/libs/admin-console/src/common/collections/models/collection.view.ts b/libs/admin-console/src/common/collections/models/collection.view.ts index 64b6e2a9d1e..2991e8bb171 100644 --- a/libs/admin-console/src/common/collections/models/collection.view.ts +++ b/libs/admin-console/src/common/collections/models/collection.view.ts @@ -126,14 +126,7 @@ export class CollectionView implements View, ITreeNodeObject { ): Promise { const view = new CollectionView({ ...collection, name: "" }); - try { - view.name = await encryptService.decryptString(collection.name, key); - } catch (e) { - view.name = "[error: cannot decrypt]"; - // eslint-disable-next-line no-console - console.error("[CollectionView] Error decrypting collection name", e); - } - + view.name = await encryptService.decryptString(collection.name, key); view.assigned = true; view.externalId = collection.externalId; view.readOnly = collection.readOnly; @@ -154,10 +147,10 @@ export class CollectionView implements View, ITreeNodeObject { try { view.name = await encryptService.decryptString(new EncString(collection.name), orgKey); } catch (e) { - view.name = "[error: cannot decrypt]"; // Note: This should be replaced by the owning team with appropriate, domain-specific behavior. // eslint-disable-next-line no-console console.error("[CollectionView] Error decrypting collection name", e); + throw e; } view.externalId = collection.externalId;