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.

Screen_Shot_2019-12-10_at_2.44.13_PM

Some other questions:

  • What happens when the prometheus server is unavailable, or returns an error?

Steps to reproduce

On a local machine running GDK:

  1. Launch the metrics dashboard, ensuring the metrics can load
  2. Disconnect the local machine from the network.
  3. 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.

Assignee Loading
Time tracking Loading