diff --git a/lib/3scale/backend/extensions/redis.rb b/lib/3scale/backend/extensions/redis.rb index d45b2789e..d56c45bbe 100644 --- a/lib/3scale/backend/extensions/redis.rb +++ b/lib/3scale/backend/extensions/redis.rb @@ -27,6 +27,10 @@ def sentinel_detect return result end rescue BaseConnectionError + rescue RuntimeError => exception + # Needed because when the sentinel address cannot be resolved it + # raises this instead of "BaseConnectionError" + raise unless exception.message =~ /Name or service not known/ ensure client.disconnect end