From 456b90898f6a7b1a4bc29170deaf9d6c40c138f7 Mon Sep 17 00:00:00 2001 From: Felipe Rodrigues Date: Mon, 31 Jul 2023 09:24:59 -0300 Subject: [PATCH] Fix error message from share server API Fixing share server api error message when share network does not exist. Closes-bug: #2025649 Change-Id: I19a2f7dbb2375b2d3a281efa673da986f29aa9d6 --- manila/api/v1/share_servers.py | 5 ++--- .../fix_share_server_api_2025649-f818f594e97c59e6.yaml | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/fix_share_server_api_2025649-f818f594e97c59e6.yaml diff --git a/manila/api/v1/share_servers.py b/manila/api/v1/share_servers.py index 51edd15de5..63fb1c1a9f 100644 --- a/manila/api/v1/share_servers.py +++ b/manila/api/v1/share_servers.py @@ -95,9 +95,8 @@ class ShareServerController(wsgi.Controller): except exception.ShareServerNotFound as e: raise exc.HTTPNotFound(explanation=e.msg) except exception.ShareNetworkNotFound: - msg = _("Share server %s could not be found. Its associated " - "share network does not " - "exist.") % server['share_network_id'] + msg = _("Share server could not be found. Its associated share " + "network %s does not exist.") % server['share_network_id'] raise exc.HTTPNotFound(explanation=msg) return self._view_builder.build_share_server(req, server) diff --git a/releasenotes/notes/fix_share_server_api_2025649-f818f594e97c59e6.yaml b/releasenotes/notes/fix_share_server_api_2025649-f818f594e97c59e6.yaml new file mode 100644 index 0000000000..31bed337a4 --- /dev/null +++ b/releasenotes/notes/fix_share_server_api_2025649-f818f594e97c59e6.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + `bug #2025649 + `_: Fixed share + server API error message.