Yes, this is expected behavior with Convex and the convex-helpers' useQueryWithStatus.
When you use a validator like zid("table") in your function arguments, Convex performs both type and runtime validation. If the id you pass does not match the expected format (i.e., it's not a valid branded ID for that table), Convex will throw a validation error before your query function even runs. This error is not caught by useQueryWithStatus as a regular query error—instead, it is thrown immediately and will bubble up to your React component, potentially triggering an error boundary or causing the component to crash if not handled.
This is confirmed in community discussions and support threads, where it's explained that the validator checks are enforced before your function logic, and if the argument doesn't pass validation, an error is thrown rather than returned as part of the query status. The recommended workaround is to use v.string() as your validator and then manually check and handle invalid IDs inside your function, allowing you to throw a ConvexError or return a custom error object that can be caught by useQueryWithStatus or similar hooks. This way, you can control the error handling flow and surface errors as part of your query status rather than as uncaught exceptions in the frontend [Value does not match validator].
In summary:
- Validation errors from argument validators (like zid) are not caught by useQueryWithStatus; they throw immediately.
- To handle such errors gracefully, use v.string() and validate/cast/check the ID inside your function, then throw a ConvexError if needed.
This is the current expected behavior in Convex.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: