When the GitLab instance has no connectivity, Prometheus requests fail with a 500 error
As part of #34121 (closed) we should improve the granularity of error codes.
Summary
When the GitLab instance has no connectivity, Prometheus requests fail with a 500
error.
Some other questions:
- What happens when the prometheus server is unavailable, or returns an error?
Steps to reproduce
On a local machine running GDK:
- Launch the metrics dashboard, ensuring the metrics can load
- Disconnect the local machine from the network.
- Refresh the dashboard.
What is the current bug behavior?
The dashboard loads, but the metrics requests return a 500
internal server error.
What is the expected correct behavior?
The dashboard loads, and there is a response that provides information about what went wrong.
Relevant logs and/or screenshots
Possible fixes
Make use of another error code such as 503 and return more information about what went wrong.