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
(cherry picked from commit 456b90898f)
(cherry picked from commit bc2e303904)
(cherry picked from commit 7adab824cf)
(cherry picked from commit 4833319ca5)
(cherry picked from commit 1751df3390)
(cherry picked from commit 1d6d4190b9)
This commit is contained in:
Felipe Rodrigues 2023-07-31 09:24:59 -03:00 committed by Goutham Pacha Ravi
parent a482eb1683
commit 20a3055c23
2 changed files with 8 additions and 2 deletions

View File

@ -94,8 +94,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 "
msg = _("Share server could not be found. Its "
"associated share network %s does not "
"exist.") % server.share_network_subnet['share_network_id']
raise exc.HTTPNotFound(explanation=msg)
return self._view_builder.build_share_server(req, server)

View File

@ -0,0 +1,6 @@
---
fixes:
- |
`bug #2025649
<https://bugs.launchpad.net/manila/+bug/2025649>`_: Fixed share
server API error message.