lib/kms_encrypted/clients/vault.rb in kms_encrypted-1.2.3 vs lib/kms_encrypted/clients/vault.rb in kms_encrypted-1.2.4
- old
+ new
@@ -28,9 +28,12 @@
options
)
rescue ::Vault::HTTPClientError => e
decryption_failed! if e.message.include?("unable to decrypt")
raise e
+ rescue ::Vault::HTTPServerError => e
+ decryption_failed! if e.message.include?("message authentication failed")
+ raise e
rescue Encoding::UndefinedConversionError
decryption_failed!
end
Base64.decode64(response.data[:plaintext])