class Faraday::Response::RaiseRapidashError

Public Instance Methods

on_complete(env) click to toggle source
# File lib/faraday/response/raise_rapidash_error.rb, line 6
def on_complete(env)
  status = env[:status].to_i
  klass = Rapidash.response_exception_class || Rapidash::ResponseError
  raise klass.new(env) if (400..599).include?(status)
end