itslekanI
Convex Community11mo ago
3 replies
itslekan

Error handling in query functions

Sometimes, when I write queries, I want to check if the user is authorized to reach that endpoint and if not I want to throw an error back to the user. But, I don't want this error to completely hijack the ui like it normally does, like with an error boundary. Sometimes, I just, say, want an additional UI to show up with the option for the user to sign in

I simply would like to have back the diversity of errors that regular http requests offer. I'm torn on how I'm supposed to implement errors for authentication, or authorization or some other error, and send that back to the frontend
Was this page helpful?