Chad MaycumberC
Convex Community3y ago
2 replies
Chad Maycumber

When Clerk token expires, errors thrown on client

I have a basic middleware component that checks for a users status, and throws an error if the identity for the user isn't found modeled off the Authentication docs.

When a token expires on the frontend this throws an error when a query is made. Which is triggering my error boundary, is there potentially a way to redirect the user or catch this before the query is made or a recommended best approach for handling this? I'm thinking maybe check the user isLoggedIn status for clerk at the top of my app.
Was this page helpful?