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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-18 17:02:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-18 17:02:45 +0300
commit80f61b4035607d7cd87de993b8f5e996bde3481f (patch)
tree06b12f51e97d87192e3dd0e05edf55143645b894 /lib/gitlab/metrics/dashboard/errors.rb
parent4ab54c2233e91f60a80e5b6fa2181e6899fdcc3e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/metrics/dashboard/errors.rb')
-rw-r--r--lib/gitlab/metrics/dashboard/errors.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/metrics/dashboard/errors.rb b/lib/gitlab/metrics/dashboard/errors.rb
index 1739a4e6738..d41bd2c43c7 100644
--- a/lib/gitlab/metrics/dashboard/errors.rb
+++ b/lib/gitlab/metrics/dashboard/errors.rb
@@ -7,14 +7,16 @@ module Gitlab
module Metrics
module Dashboard
module Errors
+ DashboardProcessingError = Class.new(StandardError)
PanelNotFoundError = Class.new(StandardError)
+ LayoutError = Class.new(DashboardProcessingError)
+ MissingQueryError = Class.new(DashboardProcessingError)
- PROCESSING_ERROR = Gitlab::Metrics::Dashboard::Stages::BaseStage::DashboardProcessingError
NOT_FOUND_ERROR = Gitlab::Template::Finders::RepoTemplateFinder::FileNotFoundError
def handle_errors(error)
case error
- when PROCESSING_ERROR
+ when DashboardProcessingError
error(error.message, :unprocessable_entity)
when NOT_FOUND_ERROR
error("#{dashboard_path} could not be found.", :not_found)