Remove detailed error error message.

This commit is contained in:
glay
2024-11-26 11:57:49 +08:00
parent 9c648e5b64
commit 8ce2cf5c3b
3 changed files with 9 additions and 12 deletions

View File

@@ -28,13 +28,11 @@ export interface ModelValidationConfig {
export function encrypt(data: string, encryptionKey: string): string {
if (!data) return "";
if (!encryptionKey) {
console.error("[AWS Encryption Error] Encryption key is required");
throw new Error("Encryption key is required for AWS credential encryption");
}
try {
return AES.encrypt(data, encryptionKey).toString();
} catch (error) {
console.error("[AWS Encryption Error]:", error);
throw new Error("Failed to encrypt AWS credentials");
}
}