fix: correct error fetching for workos login polling (#4124)

This commit is contained in:
Heitor Carvalho
2025-12-19 20:00:26 -03:00
committed by GitHub
parent 0c359f4df8
commit be70a04153

View File

@@ -149,7 +149,9 @@ class AuthenticationCommand:
return
if token_data["error"] not in ("authorization_pending", "slow_down"):
raise requests.HTTPError(token_data["error_description"])
raise requests.HTTPError(
token_data.get("error_description") or token_data.get("error")
)
time.sleep(device_code_data["interval"])
attempts += 1