Exception: Mongoid::Errors::InvalidAutoEncryptionConfiguration

Inherits:
MongoidError
  • Object
show all
Defined in:
lib/mongoid/errors/invalid_auto_encryption_configuration.rb

Overview

This error is raised when automatic encryption configuration for a client is invalid.

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Attribute Summary

Attributes inherited from MongoidError

#problem, #resolution, #summary

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(name, kms_provider = nil) ⇒ InvalidAutoEncryptionConfiguration

Initialize the error.

Parameters:

  • name (Symbol)

    The name of the client config.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/mongoid/errors/invalid_auto_encryption_configuration.rb', line 14

def initialize(name, kms_provider = nil)
  if kms_provider
    super(
      compose_message(
        "invalid_auto_encryption_configuration_for_kms_provider",
        { client: name, kms_provider: kms_provider }
      )
    )
  else
    super(
      compose_message(
        "invalid_auto_encryption_configuration",
        { client: name }
      )
    )
  end
end