Exception: CoreLibrary::ApiException
- Inherits:
-
StandardError
- Object
- StandardError
- CoreLibrary::ApiException
- Defined in:
- lib/apimatic-core/types/sdk/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.
9 10 11 12 13 |
# File 'lib/apimatic-core/types/sdk/api_exception.rb', line 9 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.
4 5 6 |
# File 'lib/apimatic-core/types/sdk/api_exception.rb', line 4 def response @response end |
#response_code ⇒ Object (readonly)
Returns the value of attribute response_code.
4 5 6 |
# File 'lib/apimatic-core/types/sdk/api_exception.rb', line 4 def response_code @response_code end |