Exception: LMRest::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- LMRest::APIError
- Defined in:
- lib/lm_rest/api_client.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(response) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(response) ⇒ APIError
Returns a new instance of APIError.
14 15 16 17 18 19 20 |
# File 'lib/lm_rest/api_client.rb', line 14 def initialize(response) @status = response.code @body = response.body @headers = response.headers super("LogicMonitor API request failed with status #{@status}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
12 13 14 |
# File 'lib/lm_rest/api_client.rb', line 12 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
12 13 14 |
# File 'lib/lm_rest/api_client.rb', line 12 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
12 13 14 |
# File 'lib/lm_rest/api_client.rb', line 12 def status @status end |