Class: Faraday::Errors

Inherits:
Middleware
  • Object
show all
Defined in:
lib/faraday/errors.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/faraday/errors.rb', line 4

def call(env)
  @app.call(env).on_complete do
    if env[:response].status == 404
      raise Reviewed::ResourceNotFound.new(msg: 'Not Found', url: env[:url])
    end
  end
end