Exception: Faraday::Error::ClientError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/faraday/error.rb

Direct Known Subclasses

ConnectionFailed, ParsingError, ResourceNotFound

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ ClientError

Returns a new instance of ClientError



4
5
6
# File 'lib/faraday/error.rb', line 4

def initialize(exception)
  @inner_exception = exception
end

Instance Method Details

#backtraceObject



14
15
16
# File 'lib/faraday/error.rb', line 14

def backtrace
  @inner_exception.backtrace
end

#inspectObject



24
25
26
# File 'lib/faraday/error.rb', line 24

def inspect
  @inner_exception.inspect
end

#messageObject Also known as: to_str



8
9
10
11
12
# File 'lib/faraday/error.rb', line 8

def message
  @inner_exception.respond_to?(:message) ? 
    @inner_exception.message             :
    @inner_exception.to_s
end

#to_sObject



20
21
22
# File 'lib/faraday/error.rb', line 20

def to_s
  @inner_exception.to_s
end