Class: HumanError::ErrorCodeDirectory

Inherits:
Object
  • Object
show all
Defined in:
lib/human_error/error_code_directory.rb

Class Method Summary collapse

Class Method Details

.directoryObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/human_error/error_code_directory.rb', line 7

def self.directory
  {
    'HumanError::Errors::InvalidTokenError'              => 1003,
    'HumanError::Errors::InvalidUsernameOrPasswordError' => 1004,
    'HumanError::Errors::ResourceNotFoundError'          => 1005,
    'HumanError::Errors::ResourcePersistenceError'       => 1006,
    'Apill::Errors::InvalidApiRequestError'              => 1007,
    'HumanError::Errors::DuplicateAuthenticationError'   => 1008,
    'HumanError::Errors::AssociationError'               => 1009,
    'Apill::Errors::InvalidSubdomainError'               => 1010,
  }
end

.lookup(error_class) ⇒ Object



3
4
5
# File 'lib/human_error/error_code_directory.rb', line 3

def self.lookup(error_class)
  directory[error_class]
end