Exception: FizzyApiClient::ApiError
- Defined in:
- lib/fizzy_api_client/error.rb
Overview
API returned an error response
Direct Known Subclasses
AuthenticationError, ForbiddenError, NotFoundError, ServerError, ValidationError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message: nil, status: nil, body: nil, method: nil, path: nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message: nil, status: nil, body: nil, method: nil, path: nil) ⇒ ApiError
Returns a new instance of ApiError.
20 21 22 23 24 25 26 27 28 |
# File 'lib/fizzy_api_client/error.rb', line 20 def initialize(message: nil, status: nil, body: nil, method: nil, path: nil) @status = status @body = body @method = method @path = path = () super() end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
18 19 20 |
# File 'lib/fizzy_api_client/error.rb', line 18 def body @body end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
18 19 20 |
# File 'lib/fizzy_api_client/error.rb', line 18 def method @method end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
18 19 20 |
# File 'lib/fizzy_api_client/error.rb', line 18 def path @path end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
18 19 20 |
# File 'lib/fizzy_api_client/error.rb', line 18 def status @status end |