]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: catch more exception to show relevant cli output 65220/head
authorTomer Haskalovitch <tomer.haska@ibm.com>
Tue, 12 Aug 2025 05:49:09 +0000 (08:49 +0300)
committerHezko <tomer.haska@gmail.com>
Mon, 25 Aug 2025 19:10:14 +0000 (22:10 +0300)
Signed-off-by: Tomer Haskalovitch <tomer.haska@ibm.com>
(cherry picked from commit 677c2c2f3275f6669dbff2e75b5a2d871635a6f2)

src/pybind/mgr/dashboard/services/nvmeof_cli.py

index c662a7fd7d5ddacf8fa76a615b546dd8446ddc6e..45624d95b323f99072d8b84da021499b57facc20 100644 (file)
@@ -10,7 +10,6 @@ from mgr_module import CLICheckNonemptyFileInput, CLICommand, CLIReadCommand, \
     CLIWriteCommand, HandleCommandResult, HandlerFuncType
 from prettytable import PrettyTable
 
-from ..exceptions import DashboardException
 from ..model.nvmeof import CliFlags, CliHeader
 from ..rest_client import RequestException
 from .nvmeof_conf import ManagedByOrchestratorException, \
@@ -267,5 +266,5 @@ class NvmeofCLICommand(CLICommand):
                 return HandleCommandResult(-errno.EINVAL, '',
                                            f"format '{out_format}' is not implemented")
             return HandleCommandResult(0, out, '')
-        except DashboardException as e:
+        except Exception as e:  # pylint: disable=broad-except
             return HandleCommandResult(-errno.EINVAL, '', str(e))