class Zendesk2::Error
Attributes
response[R]
wrapped_exception[R]
Public Class Methods
new(wrapped_exception)
click to toggle source
Calls superclass method
# File lib/zendesk2/error.rb, line 4 def initialize(wrapped_exception) @wrapped_exception = wrapped_exception @response = wrapped_exception.response message = if wrapped_exception.is_a?(Faraday::Error::ParsingError) wrapped_exception.message elsif wrapped_exception.is_a?(Faraday::Error::ClientError) || wrapped_exception.is_a?(Faraday::ClientError) wrapped_exception.response.inspect else wrapped_exception.instance_variable_get(:@wrapped_exception) end super(message) end