Receiving error when viewing Function details
Summary
When viewing function details I receive an error stating:
TypeError: Cannot read property `queries` of null
the root cause is that Prometheus is not running. A more meaningful error message might be better.
Steps to reproduce
Navigate to this project's serverless page and view a function detail page.
Example Project
https://gitlab.com/kencjohnston-apps/functions/-/serverless/functions/*/functions-haiku-js
What is the current bug behavior?
Error occurs.
What is the expected correct behavior?
Error does not occur, chart of invocations appears.
Relevant logs and/or screenshots
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Provide a better error message, instead of the above one. Instead of this specific message, return We could not reach the Prometheus backend to get you metrics. Please, check if Prometheus is running properly.
For all the other error, the errors should be surfaced as is.
Definition of Done
-
Return a more clear and helpful error message to the user. -
If possible, link to the line of code.