Exception: Moyasar::APIError

Inherits:
MoyasarError show all
Defined in:
lib/moyasar/errors/api_error.rb

Instance Attribute Summary

Attributes inherited from MoyasarError

#http_code, #type

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ APIError

Returns a new instance of APIError.



3
4
5
6
7
8
# File 'lib/moyasar/errors/api_error.rb', line 3

def initialize(attrs = {})
  attrs['type'] ||= 'API_ERROR'
  attrs['http_code'] ||= 500
  attrs['message'] = 'We had a problem with Moyasar server.'
  super(attrs)
end