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