JcampuzaJ
Convex Community7mo ago
6 replies
Jcampuza

Hey guys, trying out convex recently and

Hey guys, trying out convex recently and its going well but had a q - does anybody know what the best way would be to get clean error messages from queries? I see in the docs everywhere on how to handle application errors in mutations but it doesn't address queries very well.

I know to wrap in react with an error boundary, but still the message field is pretty convuluted including convex specific info and request id. Thats useful for me for logging but I don't want to show that to my users, just the clean client friendly error message. I currently throw the errors from my queries. Maybe I should instead be returning an actual error object instead of throwing, or perhaps throwing a ConvexError instead? Been looking but can't find anywhere documenting best practices for query error handling.
Was this page helpful?