Class: OmiseGO::ErrorHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/omisego/error_handler.rb

Constant Summary collapse

ERRORS =
{
  nil_id: {
    code: 'user:nil_id',
    description: 'The given ID was nil.'
  }
}.freeze

Class Method Summary collapse

Class Method Details

.handle(code) ⇒ Object



11
12
13
14
# File 'lib/omisego/error_handler.rb', line 11

def handle(code)
  Error.new(code: ERRORS[code][:code],
            description: ERRORS[code][:description])
end