Exception: ESP::AddExternalAccountError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/esp/external_account_creator.rb

Constant Summary collapse

EXIT_CODES =
{
  '12 characters'          => 98,
  'not a number'           => 97,
  'organization not found' => 96,
  'sub organization'       => 95,
  'team'                   => 94,
  'external account'       => 93
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ AddExternalAccountError

Returns a new instance of AddExternalAccountError.



12
13
14
# File 'lib/esp/external_account_creator.rb', line 12

def initialize(message = nil)
  super
end

Instance Method Details

#exit_codeObject



16
17
18
19
20
# File 'lib/esp/external_account_creator.rb', line 16

def exit_code
  EXIT_CODES.detect { |key, _code| message =~ /#{key}/i }.last
rescue StandardError
  1
end