Exception: Quonfig::Errors::DecryptionError

Inherits:
Quonfig::Error
  • Object
show all
Defined in:
lib/quonfig/errors/decryption_error.rb

Overview

Raised when a confidential config’s ciphertext cannot be decrypted —either the configured ‘decryptWith` key is missing/empty, or the AES-GCM payload itself is malformed/tampered.

Mirrors sdk-python’s QuonfigDecryptionError. Sdk-node currently raises plain ‘Error` for the same path; this class is the Ruby equivalent of the dedicated exception type.

Instance Method Summary collapse

Constructor Details

#initialize(key, cause = nil) ⇒ DecryptionError

Returns a new instance of DecryptionError.



13
14
15
16
17
# File 'lib/quonfig/errors/decryption_error.rb', line 13

def initialize(key, cause = nil)
  message = "Decryption failed for config '#{key}'"
  message += ": #{cause}" if cause && !cause.to_s.empty?
  super(message)
end