class Faraday::NilStatusError

Raised by Faraday::Response::RaiseError in case of a nil status in response.

Public Class Methods

new(exc, response = nil) click to toggle source
Calls superclass method Faraday::Error::new
# File lib/faraday/error.rb, line 111
def initialize(exc, response = nil)
  exc_msg_and_response!(exc, response)
  @response = unwrap_resp!(@response)
  super('http status could not be derived from the server response')
end

Private Instance Methods

unwrap_resp(resp) click to toggle source
# File lib/faraday/error.rb, line 121
def unwrap_resp(resp)
  if inner = (resp.keys.size == 1 && resp[:response])
    return unwrap_resp(inner)
  end

  resp
end
Also aliased as: unwrap_resp!
unwrap_resp!(resp)
Alias for: unwrap_resp