Merge pull request #1474 from Infisical/daniel/failed-decryption-log

Fix: Add detailed decryption error logging
This commit is contained in:
Maidul Islam
2024-02-26 16:49:52 -05:00
committed by GitHub
@@ -210,7 +210,14 @@ const decryptSymmetric = ({ ciphertext, iv, tag, key }: DecryptSymmetricProps):
try { try {
plaintext = aes.decrypt({ ciphertext, iv, tag, secret: key }); plaintext = aes.decrypt({ ciphertext, iv, tag, secret: key });
} catch (err) { } 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); process.exit(1);
} }