Sha256: 6a1fb2b0b1bd0a50971580a6ab62b180993cdf9a4f86fdd334e8ba6e21d107bb

Contents?: true

Size: 539 Bytes

Versions: 1

Compression:

Stored size: 539 Bytes

Contents

class Zendesk2::Error < StandardError

  attr_reader :wrapped_exception
  def initialize(wrapped_exception)
    @wrapped_exception = wrapped_exception
    message = if wrapped_exception.is_a?(Faraday::Error::ParsingError)
                wrapped_exception.message
              elsif wrapped_exception.is_a?(Faraday::Error::ClientError)
                wrapped_exception.response.inspect
              else
                wrapped_exception.instance_variable_get(:@wrapped_exception).inspect
              end
    super(message)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zendesk2-0.0.18 lib/zendesk2/error.rb