1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00

chore(deps): update dependency hcloud to v2.5.0 (#626)

This commit is contained in:
renovate[bot] 2025-04-28 12:55:16 +02:00 committed by GitHub
parent c37cdf0bc6
commit cf220a229f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 24 additions and 7 deletions

View file

@ -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