From 312ed86db4181ec768a77b83d449a032ea7546ab Mon Sep 17 00:00:00 2001 From: jo Date: Wed, 7 Jan 2026 13:03:59 +0100 Subject: [PATCH] feat: retry requests when the api returns a `timeout` error --- hcloud/_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hcloud/_client.py b/hcloud/_client.py index c42f4fc7..20f26c9d 100644 --- a/hcloud/_client.py +++ b/hcloud/_client.py @@ -129,6 +129,7 @@ class Client: - ``conflict`` - ``rate_limit_exceeded`` + - ``timeout`` Changes to the retry policy might occur between releases, and will not be considered breaking changes. @@ -419,6 +420,7 @@ def _retry_policy(self, exception: APIException) -> bool: return exception.code in ( "rate_limit_exceeded", "conflict", + "timeout", ) if isinstance(exception.code, int):