Sha256: cf98dae44e92e353f3101d8513ca377d9060868f7d8e893c32736bcc56015879
Contents?: true
Size: 311 Bytes
Versions: 3
Compression:
Stored size: 311 Bytes
Contents
module Faraday class Errors < Faraday::Middleware def call(env) @app.call(env).on_complete do if env[:response].status == 404 raise Reviewed::ResourceNotFound.new('Not Found') end end end end end Faraday.register_middleware :response, errors: Faraday::Errors
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
reviewed-0.1.29 | lib/faraday/errors.rb |
reviewed-0.1.28 | lib/faraday/errors.rb |
reviewed-0.1.27 | lib/faraday/errors.rb |