misc: added handling for case enforcement

This commit is contained in:
Sheen Capadngan
2025-01-16 19:10:00 +08:00
parent 6ee446e574
commit 440f93f392
11 changed files with 111 additions and 19 deletions
@@ -1267,9 +1267,10 @@ export const secretApprovalRequestServiceFactory = ({
type: SecretType.Shared
}))
);
if (secrets.length)
if (secrets.length !== secretsWithNewName.length)
throw new NotFoundError({
message: `Secret does not exist: ${secretsToUpdateStoredInDB.map((el) => el.key).join(",")}`
message: `Secret does not exist: ${secrets.map((el) => el.key).join(",")}`
});
}