lib/preservation/client/error_faraday_middleware.rb in preservation-client-3.5.0 vs lib/preservation/client/error_faraday_middleware.rb in preservation-client-4.0.0

- old
+ new

@@ -2,10 +2,10 @@ module Preservation class Client # This wraps any faraday connection errors with preservation-client errors # see https://www.rubydoc.info/gems/faraday/Faraday/ClientError for info on errors - class ErrorFaradayMiddleware < Faraday::Response::Middleware + class ErrorFaradayMiddleware < Faraday::Middleware def call(env) @app.call(env) rescue Faraday::ConnectionFailed, Faraday::SSLError, Faraday::TimeoutError => e raise ConnectionFailedError, "Unable to reach Preservation Catalog - failed with #{e.class}: #{e.message}" end