Three layers
1
Validation at the boundary
Convex schema validators reject malformed data before it touches your handler. Add business-rule validation in mutations.
2
Structured errors in functions
Throw with meaningful messages:
throw new Error("Email already in use"). The client receives the message.3
UX-friendly handling on the client
Catch errors at component boundaries; show a user-readable message; offer recovery actions.
Server-side patterns
ConvexError is structured — the client sees code and message separately.
Client-side patterns
Error boundaries
For UI-level failures (a render error):Retry policy
For transient failures:Tips
Related
Input validation
The first defense.
Sentry integration
Error tracking.
Troubleshooting
Common errors.
