Oren
Oren5mo ago

how to handle auth errors

Hey I'm trying to show an error to user when auth fails for example when their magic link is expired with auth.js / nextauth I could add error page specified with url param of the error and display it there but how can we handle it with convex auth?
1 Reply
smaccoun
smaccoun2mo ago
I"m also wondering about this. I'm trying to use e instanceof ConvexError and it's not working great. It would be nice for for application level errors in convex auth if it just returned a successful Result<Failure, Success>type with known error so we could handle these intelligently on the clietn wiht the erorr messages we want. Auth is a plcace where there are a lot of handleable errors that need to be dealt with

Did you find this page helpful?