]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Imrove error message of '/api/grafana/validation' API endpoint 45956/head
authorVolker Theile <vtheile@suse.com>
Wed, 30 Mar 2022 11:38:33 +0000 (13:38 +0200)
committerVolker Theile <vtheile@suse.com>
Tue, 19 Apr 2022 11:54:36 +0000 (13:54 +0200)
commit85f2a9aa2758570950edab415d7ef6043e5a76cf
tree6a866150ba0e79e9e42400bb1fc5c790eb9158cd
parent3085d177990819a77cfbe27707f0baa5695e36d9
mgr/dashboard: Imrove error message of '/api/grafana/validation' API endpoint

In case the validation of the Grafana URL fails, e.g. because of an invalid SSL certificate, a useless and not helping default error message is displayed in the UI.
This PR will re-raise the exception as a DashboardException which includes the detailed description of what happened. This will help to identify SSL cert issues much easier for example.

Fixes: https://tracker.ceph.com/issues/55133
Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit 83524ed1bfb7c8cef307d7c21c3452cbe7a16c4b)

Conflicts:
src/pybind/mgr/dashboard/services/exception.py
src/pybind/mgr/dashboard/controllers/grafana.py
src/pybind/mgr/dashboard/services/exception.py
src/pybind/mgr/dashboard/tests/test_grafana.py