From 8b567fbf5871239b8a0483847bacba21b2ee67f4 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Tue, 22 Sep 2026 00:55:37 -0400 Subject: [PATCH] Raise immediately on the token statuses RETRY_ERROR_DENY names Signed-off-by: Arpit Jain --- server/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/app.py b/server/app.py index 45fa8a5..0aa6e72 100644 --- a/server/app.py +++ b/server/app.py @@ -136,7 +136,7 @@ def get_authorization_token_with_retry(auth_data, code, state): return bb.get_authorization_token(auth_data, code, state) except requests.exceptions.HTTPError as ex: status_code = ex.response.status_code if ex.response is not None else None - if attempt == TOKEN_RETRY_TOTAL and status_code not in RETRY_ERROR_DENY: + if attempt == TOKEN_RETRY_TOTAL or status_code in RETRY_ERROR_DENY: raise wait_seconds = TOKEN_RETRY_BACKOFF_SECONDS * (2**attempt) print(