Sha256: 3ca5dea80389ab0ba1df094d8e2d31407083b4845f44bb642bc5bba243ef0c9e
Contents?: true
Size: 622 Bytes
Versions: 1
Compression:
Stored size: 622 Bytes
Contents
# frozen_string_literal: true class Zendesk2::Error < StandardError attr_reader :wrapped_exception, :response 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zendesk2-1.15.0 | lib/zendesk2/error.rb |