From 3471f7682167d124d6bd71952c6613f507e79a0f Mon Sep 17 00:00:00 2001 From: Joe Gaudet Date: Wed, 22 Sep 2021 13:40:46 -0700 Subject: [PATCH] Listen for correct Faraday error --- lib/librato/metrics/middleware/retry.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/librato/metrics/middleware/retry.rb b/lib/librato/metrics/middleware/retry.rb index 3ab640e..f01690a 100644 --- a/lib/librato/metrics/middleware/retry.rb +++ b/lib/librato/metrics/middleware/retry.rb @@ -15,8 +15,7 @@ def call(env) begin env[:body] = request_body # after failure is set to response body @app.call(env) - rescue Librato::Metrics::ServerError, Timeout::Error, - Faraday::Error::ConnectionFailed + rescue Librato::Metrics::ServerError, Timeout::Error, Faraday::ConnectionFailed if retries > 0 retries -= 1 and retry end @@ -28,4 +27,4 @@ def call(env) end end -end \ No newline at end of file +end