diff --git a/plugins/module_utils/vendor/hcloud/_exceptions.py b/plugins/module_utils/vendor/hcloud/_exceptions.py index c884a9a..e33105a 100644 --- a/plugins/module_utils/vendor/hcloud/_exceptions.py +++ b/plugins/module_utils/vendor/hcloud/_exceptions.py @@ -4,11 +4,15 @@ from typing import Any class HCloudException(Exception): - """There was an error while using the hcloud library""" + """There was an error while using the hcloud library. + + All exceptions in the hcloud library inherit from this exception. It may be used as + catch-all exception. + """ class APIException(HCloudException): - """There was an error while performing an API Request""" + """There was an error while performing an API Request.""" def __init__( self, diff --git a/plugins/module_utils/vendor/hcloud/_version.py b/plugins/module_utils/vendor/hcloud/_version.py index 591adbf..3f2e8eb 100644 --- a/plugins/module_utils/vendor/hcloud/_version.py +++ b/plugins/module_utils/vendor/hcloud/_version.py @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "2.4.0" # x-releaser-pleaser-version +__version__ = "2.5.0" # x-releaser-pleaser-version diff --git a/plugins/module_utils/vendor/hcloud/actions/domain.py b/plugins/module_utils/vendor/hcloud/actions/domain.py index af2b298..92b40a8 100644 --- a/plugins/module_utils/vendor/hcloud/actions/domain.py +++ b/plugins/module_utils/vendor/hcloud/actions/domain.py @@ -74,9 +74,22 @@ class ActionException(HCloudException): def __init__(self, action: Action | BoundAction): assert self.__doc__ is not None message = self.__doc__ - if action.error is not None and "message" in action.error: + + extras = [] + if ( + action.error is not None + and "code" in action.error + and "message" in action.error + ): message += f": {action.error['message']}" + extras.append(action.error["code"]) + else: + extras.append(action.command) + + extras.append(str(action.id)) + message += f" ({', '.join(extras)})" + super().__init__(message) self.message = message self.action = action