From e1bedc2c657c9a4f1e0843efeda5fffd6de8c7bb Mon Sep 17 00:00:00 2001 From: Patrick Brinich-Langlois Date: Fri, 30 Jul 2021 10:30:19 -0700 Subject: [PATCH] Use correct namespace for ConnectionFailed Faraday error See https://github.com/librato/librato-metrics/issues/144 for more info. --- lib/librato/metrics/middleware/retry.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librato/metrics/middleware/retry.rb b/lib/librato/metrics/middleware/retry.rb index 3ab640e..7120552 100644 --- a/lib/librato/metrics/middleware/retry.rb +++ b/lib/librato/metrics/middleware/retry.rb @@ -16,7 +16,7 @@ def call(env) env[:body] = request_body # after failure is set to response body @app.call(env) rescue Librato::Metrics::ServerError, Timeout::Error, - Faraday::Error::ConnectionFailed + Faraday::ConnectionFailed if retries > 0 retries -= 1 and retry end @@ -28,4 +28,4 @@ def call(env) end end -end \ No newline at end of file +end