Sha256: 2d57908a823b4a4437f85ee99575abc69ac59b2f98514cccc930c78c3157c03f

Contents?: true

Size: 252 Bytes

Versions: 5

Compression:

Stored size: 252 Bytes

Contents

module Rooftop
  class RecordNotFoundMiddleware < Faraday::Response::Middleware
    def on_complete(env)
      case env[:status]
        when 404
          raise Rooftop::RecordNotFoundError, '404 received from Rooftop API'
      end
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rooftop-0.1.4.1 lib/rooftop/middleware/record_not_found_middleware.rb
rooftop-0.1.4 lib/rooftop/middleware/record_not_found_middleware.rb
rooftop-0.1.3 lib/rooftop/middleware/record_not_found_middleware.rb
rooftop-0.1.2 lib/rooftop/middleware/record_not_found_middleware.rb
rooftop-0.1.1 lib/rooftop/middleware/record_not_found_middleware.rb