Class: Gemfury::Client::Handle503

Inherits:
Faraday::Middleware
  • Object
show all
Defined in:
lib/gemfury/client/middleware.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object


4
5
6
7
8
9
# File 'lib/gemfury/client/middleware.rb', line 4

def call(env)
  # This prevents errors in ParseJson 
  @app.call(env).on_complete do |out|
    out[:body] = '' if out[:status] == 503
  end
end