Class: Dor::Services::Client::ErrorFaradayMiddleware
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Dor::Services::Client::ErrorFaradayMiddleware
- Defined in:
- lib/dor/services/client/error_faraday_middleware.rb
Overview
This wraps any faraday connection errors with dor-services-client errors
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 |
# File 'lib/dor/services/client/error_faraday_middleware.rb', line 8 def call(env) @app.call(env) rescue Faraday::ConnectionFailed => e raise ConnectionFailed, "unable to reach dor-services-app: #{e}", e.backtrace end |