]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: 404 instead of 500 on missing filesystem
authorJohn Spray <john.spray@redhat.com>
Fri, 29 Sep 2017 11:01:48 +0000 (07:01 -0400)
committerJohn Spray <john.spray@redhat.com>
Fri, 29 Sep 2017 11:07:04 +0000 (07:07 -0400)
Still not the most beautiful but lets reserve 500s
for real errors.

Signed-off-by: John Spray <john.spray@redhat.com>
src/pybind/mgr/dashboard/module.py

index 114271caea81306fd4b3dff12b0ddd32069d5ac8..551965ad29471637ca102afe540f83d0df4de8bc 100644 (file)
@@ -255,6 +255,10 @@ class Module(MgrModule):
                 filesystem = fs
                 break
 
+        if filesystem is None:
+            raise cherrypy.HTTPError(404,
+                "Filesystem id {0} not found".format(fs_id))
+
         rank_table = []
 
         mdsmap = filesystem['mdsmap']