Exception: AlterEgo::APIError

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

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ APIError

:nodoc:



77
78
79
80
# File 'lib/alterego.rb', line 77

def initialize(response) # :nodoc:
  error = JSON.parse(response)
  super "<#{error['code']}> #{error['name']}: #{error['message']}"
end