diff --git a/lib/lichess.py b/lib/lichess.py index 68faaed48..af4f1b281 100644 --- a/lib/lichess.py +++ b/lib/lichess.py @@ -75,6 +75,10 @@ def is_final(exception: Exception) -> bool: def backoff_handler(details: BackoffDetails) -> None: """Log exceptions inside functions with the backoff decorator.""" + args = details["args"] + kwargs = details["kwargs"] + if "token_test" in args: + kwargs["data"] = "" logger.debug("Backing off {wait:0.1f} seconds after {tries} tries " "calling function {target} with args {args} and kwargs {kwargs}".format(**details)) logger.debug(f"Exception: {traceback.format_exc()}")