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/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)