Exception: SurenotifyRails::APIError

Inherits:
Error
  • Object
show all
Defined in:
lib/surenotify_rails/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code: nil, body: nil) ⇒ APIError

Returns a new instance of APIError.



11
12
13
14
15
# File 'lib/surenotify_rails/errors.rb', line 11

def initialize(message, code: nil, body: nil)
  super(message)
  @code = code
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



9
10
11
# File 'lib/surenotify_rails/errors.rb', line 9

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



9
10
11
# File 'lib/surenotify_rails/errors.rb', line 9

def code
  @code
end