Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gitlab-External-Templates
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adri
Gitlab-External-Templates
Commits
b97fad8e
Commit
b97fad8e
authored
6 years ago
by
Mark Fletcher
Browse files
Options
Downloads
Patches
Plain Diff
Return chart loading errors for display
parent
cded4348
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ee/app/controllers/concerns/insights_actions.rb
+7
-0
7 additions, 0 deletions
ee/app/controllers/concerns/insights_actions.rb
with
7 additions
and
0 deletions
ee/app/controllers/concerns/insights_actions.rb
+
7
−
0
View file @
b97fad8e
...
...
@@ -6,6 +6,9 @@ module InsightsActions
included
do
before_action
:check_insights_available!
before_action
:validate_params
,
only:
[
:query
]
rescue_from
Gitlab
::
Insights
::
Validators
::
ParamsValidator
::
ParamsValidatorError
,
Gitlab
::
Insights
::
Finders
::
IssuableFinder
::
IssuableFinderError
,
with: :render_insights_chart_error
end
def
show
...
...
@@ -69,4 +72,8 @@ def serializer(chart_type)
def
config_data
insights_entity
.
insights_config
end
def
render_insights_chart_error
(
exception
)
render
json:
{
message:
exception
.
message
},
status:
422
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment