Exception: XeroKiwi::APIError
- Defined in:
- lib/xero_kiwi/errors.rb
Direct Known Subclasses
AuthenticationError, ClientError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, body, message = nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(status, body, message = nil) ⇒ APIError
Returns a new instance of APIError.
9 10 11 12 13 |
# File 'lib/xero_kiwi/errors.rb', line 9 def initialize(status, body, = nil) @status = status @body = body super( || "Xero API responded with #{status}: #{body.inspect}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
7 8 9 |
# File 'lib/xero_kiwi/errors.rb', line 7 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/xero_kiwi/errors.rb', line 7 def status @status end |