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

Return 401 when token is invalid #714

Merged
merged 2 commits into from
Apr 18, 2022
Merged

Conversation

gdm85
Copy link
Contributor

@gdm85 gdm85 commented Apr 6, 2022

In some rare instances (a race condition perhaps?) a cryptography.fernet.InvalidToken exception is thrown resulting into a broken connection.

This change gracefully returns a 401 error instead.

NOTE: it might be desirable to do some logging as well if the client is induced into this error because of a bug on server side

@gdm85 gdm85 force-pushed the fix/invalid-token-401 branch from f432494 to 992817c Compare April 7, 2022 00:09
@gdm85 gdm85 force-pushed the fix/invalid-token-401 branch from 992817c to 41b9e4c Compare April 7, 2022 12:47
@benbusby benbusby merged commit 94b4eb0 into benbusby:main Apr 18, 2022
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.

2 participants