Exception: ApiKeys::Errors::EnvironmentMismatchError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/api_keys/errors.rb

Overview

Raised when API key environment doesn't match current environment (strict isolation)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key_environment:, current_environment:) ⇒ EnvironmentMismatchError

Returns a new instance of EnvironmentMismatchError.



19
20
21
22
23
# File 'lib/api_keys/errors.rb', line 19

def initialize(key_environment:, current_environment:)
  @key_environment = key_environment
  @current_environment = current_environment
  super("API key environment (#{key_environment}) does not match current environment (#{current_environment})")
end

Instance Attribute Details

#current_environmentObject (readonly)

Returns the value of attribute current_environment.



17
18
19
# File 'lib/api_keys/errors.rb', line 17

def current_environment
  @current_environment
end

#key_environmentObject (readonly)

Returns the value of attribute key_environment.



17
18
19
# File 'lib/api_keys/errors.rb', line 17

def key_environment
  @key_environment
end