From 3f704b9d5201d20ee803f6db4386d5c01edba404 Mon Sep 17 00:00:00 2001 From: "Jonas Brand (8R0WNI3)" Date: Thu, 18 Jun 2026 11:10:10 +0200 Subject: [PATCH] chore(bdba): Properly log response object in case of errors Signed-off-by: Jonas Brand (8R0WNI3) --- src/bdba/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bdba/client.py b/src/bdba/client.py index cf363d01..e596584e 100644 --- a/src/bdba/client.py +++ b/src/bdba/client.py @@ -177,8 +177,12 @@ def increment( retry = super().increment(method, url, response, error, _pool, _stacktrace) # Use the Retry history to determine the number of retries. num_retries = len(self.history) if self.history else 0 + status = response.status if response else None + reason = response.reason if response else None + content = response.data.decode() if response else None logger.warning( - f'{method=} {url=} returned {response=} {error=} {num_retries=} - trying again', + f'{method=} {url=} returned {status=} {reason=} {error=} {num_retries=} - trying again ' + f'({content=})', ) return retry