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 'app/models/blob_viewer/metrics_dashboard_yml.rb')
-rw-r--r--app/models/blob_viewer/metrics_dashboard_yml.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/blob_viewer/metrics_dashboard_yml.rb b/app/models/blob_viewer/metrics_dashboard_yml.rb
index 88643253d3d..cac6b2192d0 100644
--- a/app/models/blob_viewer/metrics_dashboard_yml.rb
+++ b/app/models/blob_viewer/metrics_dashboard_yml.rb
@@ -36,10 +36,10 @@ module BlobViewer
yaml = ::Gitlab::Config::Loader::Yaml.new(blob.data).load_raw!
::PerformanceMonitoring::PrometheusDashboard.from_json(yaml)
[]
- rescue Gitlab::Config::Loader::FormatError => error
- ["YAML syntax: #{error.message}"]
- rescue ActiveModel::ValidationError => invalid
- invalid.model.errors.messages.map { |messages| messages.join(': ') }
+ rescue Gitlab::Config::Loader::FormatError => e
+ ["YAML syntax: #{e.message}"]
+ rescue ActiveModel::ValidationError => e
+ e.model.errors.messages.map { |messages| messages.join(': ') }
end
def exhaustive_metrics_dashboard_validation
@@ -47,8 +47,8 @@ module BlobViewer
Gitlab::Metrics::Dashboard::Validator
.errors(yaml, dashboard_path: blob.path, project: project)
.map(&:message)
- rescue Gitlab::Config::Loader::FormatError => error
- [error.message]
+ rescue Gitlab::Config::Loader::FormatError => e
+ [e.message]
end
end
end