Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/feature.rb')
-rw-r--r--lib/feature.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/feature.rb b/lib/feature.rb
index ca91d86c199..f317e8cb2c5 100644
--- a/lib/feature.rb
+++ b/lib/feature.rb
@@ -31,7 +31,11 @@ module Feature
def feature_flags_available?
# When the DBMS is not available, an exception (e.g. PG::ConnectionBad) is raised
- active_db_connection = ActiveRecord::Base.connection.active? rescue false # rubocop:disable Database/MultipleDatabases
+ active_db_connection = begin
+ ActiveRecord::Base.connection.active? # rubocop:disable Database/MultipleDatabases
+ rescue StandardError
+ false
+ end
active_db_connection && Feature::FlipperFeature.table_exists?
rescue ActiveRecord::NoDatabaseError