Exception: Harborapp::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Harborapp::ApiError
- Defined in:
- lib/harborapp/api_error.rb
Direct Known Subclasses
ExpiredApiKey, InvalidApiKey, NilApiResponse, UnknownResponse
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, headers, body) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(status, headers, body) ⇒ ApiError
Returns a new instance of ApiError.
4 5 6 7 8 |
# File 'lib/harborapp/api_error.rb', line 4 def initialize(status, headers, body) self.status = status self.headers = headers self.errors = body["errors"] end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/harborapp/api_error.rb', line 3 def errors @errors end |
#headers ⇒ Object
Returns the value of attribute headers.
3 4 5 |
# File 'lib/harborapp/api_error.rb', line 3 def headers @headers end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/harborapp/api_error.rb', line 3 def status @status end |