Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not log an error on token refresh in bytes client #2469

Merged
merged 4 commits into from
Feb 11, 2024

Conversation

dekkers
Copy link
Contributor

@dekkers dekkers commented Feb 8, 2024

Changes

In the bytes client in boefjes we always logged when the request returned an error. This was also done when a 401 was returned because the token needs to be refreshed. This resulted in a confusing error message about the 401, because the code in retry_with_login would just refresh the token and retry the request and nothing went wrong.

It also fixes the wrong re-raising of the exception when the status isn't 401.


Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@dekkers dekkers self-assigned this Feb 8, 2024
@dekkers dekkers requested a review from a team as a code owner February 8, 2024 11:24
Copy link
Contributor

@underdarknl underdarknl left a comment

Choose a reason for hiding this comment

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

Debug logging is still useful

@underdarknl underdarknl merged commit 84f714a into main Feb 11, 2024
11 checks passed
@underdarknl underdarknl deleted the do-not-log-error-token-refresh branch February 11, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants