]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monitoring/grafana: ValueError instead of RuntimeError
authorPere Diaz Bou <pdiazbou@redhat.com>
Thu, 16 Dec 2021 14:31:28 +0000 (15:31 +0100)
committerPere Diaz Bou <pdiazbou@redhat.com>
Tue, 18 Jan 2022 12:24:12 +0000 (13:24 +0100)
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
monitoring/grafana/dashboards/tests/util.py

index 1b7e1ac265df32a26c091830ab952b3db763865a..88337728e80e1ec8e8a4b325c9e6b59bdcdb3265 100644 (file)
@@ -66,7 +66,7 @@ def add_dashboard_queries(data: Dict[str, Any], dashboard_data: Dict[str, Any],
                 data['queries'][query_id] = {'query': target['expr'], 'path': path}
                 data['stats'][path]['total'] += 1
     if error:
-        raise RuntimeError(f'Missing legend_format in queries, please add a proper value.')
+        raise ValueError(f'Missing legend_format in queries, please add a proper value.')
 
 
 def add_dashboard_variables(data: Dict[str, Any], dashboard_data: Dict[str, Any]) -> None: