[PR #714] [MERGED] Return 401 when token is invalid #950

Closed
opened 2026-02-25 20:37:12 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/benbusby/whoogle-search/pull/714
Author: @gdm85
Created: 4/6/2022
Status: Merged
Merged: 4/18/2022
Merged by: @benbusby

Base: mainHead: fix/invalid-token-401


📝 Commits (2)

  • 41b9e4c Return 401 when token is invalid
  • 9ed2c59 Merge remote-tracking branch 'upstream/main' into fix/invalid-token-401

📊 Changes

1 file changed (+10 additions, -3 deletions)

View changed files

📝 app/routes.py (+10 -3)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/benbusby/whoogle-search/pull/714 **Author:** [@gdm85](https://github.com/gdm85) **Created:** 4/6/2022 **Status:** ✅ Merged **Merged:** 4/18/2022 **Merged by:** [@benbusby](https://github.com/benbusby) **Base:** `main` ← **Head:** `fix/invalid-token-401` --- ### 📝 Commits (2) - [`41b9e4c`](https://github.com/benbusby/whoogle-search/commit/41b9e4c6c162f703f5d46074fa5ad8d5258fd7e6) Return 401 when token is invalid - [`9ed2c59`](https://github.com/benbusby/whoogle-search/commit/9ed2c592ea0b1e6a9163da283e13ecd086ecf2f7) Merge remote-tracking branch 'upstream/main' into fix/invalid-token-401 ### 📊 Changes **1 file changed** (+10 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `app/routes.py` (+10 -3) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 20:37:12 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#950
No description provided.