mirror of
https://github.com/Mintplex-Labs/anything-llm
synced 2026-04-25 17:15:37 +02:00
Fix Stale User Session with Proper fetch Error Handling (#4770)
* add refresh user functionality * prettier * add eslint disable comment for exhaustive-deps warning in AuthContext to stop nagging about navigate func * remove unused imports and fix typo * handle unsafe parse of undefined for in-session user deleted * Refactor refreshUser function to handle errors and return structured response. Update AuthProvider to manage user data based on success status. * Remove console error logging from promise catch in System model for cleaner error handling. * change status from 404 to 400 and valid to success * Refactor error handling in AuthProvider's refreshUser logic to remove redundant catch block and streamline user session management on failure. * prettier * reorder clauses - return errors * refactor account for all user modes dev build --------- Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
This commit is contained in:
2
.github/workflows/dev-build.yaml
vendored
2
.github/workflows/dev-build.yaml
vendored
@@ -6,7 +6,7 @@ concurrency:
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ['migrate-to-bcryptjs'] # put your current branch to create a build. Core team only.
|
||||
branches: ['bug-user-session-stale'] # put your current branch to create a build. Core team only.
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'cloud-deployments/*'
|
||||
|
||||
Reference in New Issue
Block a user