Exception: ApimaticCalculator::APIException
- Inherits:
-
StandardError
- Object
- StandardError
- ApimaticCalculator::APIException
- Defined in:
- lib/apimatic_calculator/exceptions/api_exception.rb
Overview
Class for exceptions when there is a network error, status code error, etc.
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#response_code ⇒ Object
readonly
Returns the value of attribute response_code.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ APIException
constructor
The constructor.
Constructor Details
#initialize(reason, response) ⇒ APIException
The constructor.
14 15 16 17 18 |
# File 'lib/apimatic_calculator/exceptions/api_exception.rb', line 14 def initialize(reason, response) super(reason) @response = response @response_code = response.status_code end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/apimatic_calculator/exceptions/api_exception.rb', line 9 def response @response end |
#response_code ⇒ Object (readonly)
Returns the value of attribute response_code.
9 10 11 |
# File 'lib/apimatic_calculator/exceptions/api_exception.rb', line 9 def response_code @response_code end |