Exception: Formable::Error

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

Overview

Raised for any non-2xx response from the Formable API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status:, body: nil) ⇒ Error

Returns a new instance of Error.



8
9
10
11
12
# File 'lib/formable/error.rb', line 8

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'lib/formable/error.rb', line 6

def body
  @body
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/formable/error.rb', line 6

def status
  @status
end