]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Imrove error message of '/api/grafana/validation' API endpoint 45708/head
authorVolker Theile <vtheile@suse.com>
Wed, 30 Mar 2022 11:38:33 +0000 (13:38 +0200)
committerVolker Theile <vtheile@suse.com>
Wed, 13 Apr 2022 11:59:39 +0000 (13:59 +0200)
commit83524ed1bfb7c8cef307d7c21c3452cbe7a16c4b
treec946f02efd1f48cd19e6b285f5d9e1d053829aff
parent85ec4d6ebdbd284c487f10d4c3957ba5a58ce719
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>
src/pybind/mgr/dashboard/controllers/grafana.py
src/pybind/mgr/dashboard/services/exception.py
src/pybind/mgr/dashboard/tests/test_grafana.py