Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Fix: Add detailed decryption error logging

Daniel Hougaard514304eed03b
diff --git a/frontend/src/components/utilities/cryptography/crypto.ts b/frontend/src/components/utilities/cryptography/crypto.ts
index 0f0e4af223..c0e5d4c218 100644
--- a/frontend/src/components/utilities/cryptography/crypto.ts
+++ b/frontend/src/components/utilities/cryptography/crypto.ts
@@ -210,7 +210,14 @@ const decryptSymmetric = ({ ciphertext, iv, tag, key }: DecryptSymmetricProps):
try {
plaintext = aes.decrypt({ ciphertext, iv, tag, secret: key });
} catch (err) {
- console.log("Failed to perform decryption");
+ console.log("Failed to decrypt with the following parameters", {
+ ciphertext,
+ iv,
+ tag,
+ key
+ });
+ console.log("Failed to perform decryption", err);
+
process.exit(1);
}