Fixes issue with failure messages (#58173)
This commit is contained in:
parent
becca36c5e
commit
cee3d539cb
1 changed files with 7 additions and 3 deletions
|
@ -496,9 +496,13 @@ class ModuleManager(object):
|
||||||
self.want.tenants
|
self.want.tenants
|
||||||
)
|
)
|
||||||
response = self.client.api.delete(uri)
|
response = self.client.api.delete(uri)
|
||||||
if response.status == 200:
|
if response.status != 200:
|
||||||
return True
|
result = response.json()
|
||||||
raise F5ModuleError(response.content)
|
errors = self._get_errors_from_response(result)
|
||||||
|
if errors:
|
||||||
|
message = "{0}".format('. '.join(errors))
|
||||||
|
raise F5ModuleError(message)
|
||||||
|
raise F5ModuleError(response.content)
|
||||||
|
|
||||||
|
|
||||||
class ArgumentSpec(object):
|
class ArgumentSpec(object):
|
||||||
|
|
Loading…
Reference in a new issue