Sha256: 04557d13743bf41db2c2ed6bae1b0ff1003fda86b718bf6a644b2936dec5407d
Contents?: true
Size: 626 Bytes
Versions: 47
Compression:
Stored size: 626 Bytes
Contents
module ZendeskAPI module Error class ClientError < Faraday::Error::ClientError attr_reader :wrapped_exception end class RecordInvalid < ClientError attr_accessor :response, :errors def initialize(response) @response = response if response[:body].is_a?(Hash) && response[:body].key?("details") @errors = response[:body]["details"] else @errors = {} end end def to_s "#{self.class.name}: #{@errors.to_s}" end end class NetworkError < ClientError; end class RecordNotFound < ClientError; end end end
Version data entries
47 entries across 47 versions & 1 rubygems