From: John Spray Date: Fri, 29 Sep 2017 11:01:48 +0000 (-0400) Subject: mgr/dashboard: 404 instead of 500 on missing filesystem X-Git-Tag: v13.0.1~364^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7e62cb703c64dbe177cc69d904ed4888b74cdb86;p=ceph.git mgr/dashboard: 404 instead of 500 on missing filesystem Still not the most beautiful but lets reserve 500s for real errors. Signed-off-by: John Spray --- diff --git a/src/pybind/mgr/dashboard/module.py b/src/pybind/mgr/dashboard/module.py index 114271caea813..551965ad29471 100644 --- a/src/pybind/mgr/dashboard/module.py +++ b/src/pybind/mgr/dashboard/module.py @@ -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']