From: John Mulligan Date: Tue, 21 Apr 2026 18:30:13 +0000 (-0400) Subject: mgr/smb: add a new error type to reflect non-matching inputs X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5280f2851eb0bde550191a4c54e3d57192e5ad45;p=ceph.git mgr/smb: add a new error type to reflect non-matching inputs It's not that the input was bad, it just reflects that nothing matching the input value was found. Signed-off-by: John Mulligan --- diff --git a/src/pybind/mgr/smb/cli.py b/src/pybind/mgr/smb/cli.py index f6a97dc8748e..8b70675a0a98 100644 --- a/src/pybind/mgr/smb/cli.py +++ b/src/pybind/mgr/smb/cli.py @@ -76,6 +76,11 @@ class InvalidInputValue(object_format.ErrorResponseBase): return -errno.EINVAL, "", str(self) +class NoMatchingValue(object_format.ErrorResponseBase): + def format_response(self) -> Tuple[int, str, str]: + return -errno.ENOENT, "", str(self) + + @contextlib.contextmanager def error_wrapper() -> Iterator[None]: """Context-decorator that converts between certain common exception types."""