Class: TestTrack::ServerErrorMiddleware

Inherits:
Faraday::Response::Middleware
  • Object
show all
Defined in:
lib/test_track/server_error_middleware.rb

Instance Method Summary collapse

Instance Method Details

#call(request_env) ⇒ Object



5
6
7
8
9
# File 'lib/test_track/server_error_middleware.rb', line 5

def call(request_env)
  @app.call request_env
rescue *SERVER_ERRORS => e
  raise UnrecoverableConnectivityError, e
end