Exception: TrackerApi::Error
- Defined in:
- lib/tracker_api/error.rb
Direct Known Subclasses
TrackerApi::Errors::ClientError, TrackerApi::Errors::ServerError
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#wrapped_exception ⇒ Object
readonly
Returns the value of attribute wrapped_exception.
Instance Method Summary collapse
-
#initialize(wrapped_exception) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(wrapped_exception) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/tracker_api/error.rb', line 5 def initialize(wrapped_exception) @wrapped_exception = wrapped_exception @response = wrapped_exception.response = if wrapped_exception.is_a?(Faraday::ParsingError) wrapped_exception. elsif faraday_response_error?(wrapped_exception) wrapped_exception.response.inspect else wrapped_exception.instance_variable_get(:@wrapped_exception).inspect end super() end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/tracker_api/error.rb', line 3 def response @response end |
#wrapped_exception ⇒ Object (readonly)
Returns the value of attribute wrapped_exception.
3 4 5 |
# File 'lib/tracker_api/error.rb', line 3 def wrapped_exception @wrapped_exception end |