Skip to content

Log a warning if the token is likely bad#34

Merged
Michel Edkrantz (MichelEdkrantz) merged 2 commits intomasterfrom
log-broken-tokens
Aug 15, 2025
Merged

Log a warning if the token is likely bad#34
Michel Edkrantz (MichelEdkrantz) merged 2 commits intomasterfrom
log-broken-tokens

Conversation

@petern-annotell
Copy link
Copy Markdown
Contributor

@petern-annotell Peter Newman (petern-annotell) commented Apr 24, 2025

From a support ping to team order.

Sometimes logging a refreshed auth token fails because the response doesn't contain the expiry time. Since this is only logging, it's a shame to get an error here. This attempts to turn the error into a warning of problems to come. Auth will still likely not have worked.

Users are seeing this now with KIO 2.4.0 against prod, we don't know why. Seems the auth-api is happily handing out tokens to the user in question. But this might shed some light on what the response contains.

Edit: the response contains 429 rate limit exceeded errors. Attempt to surface those here: #35

Copy link
Copy Markdown

@AndersNordmark AndersNordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread src/kognic/auth/base/auth_client.py Outdated
Comment thread src/kognic/auth/base/auth_client.py Outdated
@MichelEdkrantz Michel Edkrantz (MichelEdkrantz) merged commit 7f59b1e into master Aug 15, 2025
7 checks passed
@MichelEdkrantz Michel Edkrantz (MichelEdkrantz) deleted the log-broken-tokens branch August 15, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants