prometheas πŸ”₯P
Convex Communityβ€’17mo agoβ€’
19 replies
prometheas πŸ”₯

How to handle errors with the `usePaginatedQuery()` React hook?

Greetings, all πŸ‘‹ I'm brand-new to the discord community, and also in fact somewhat new to Convex (two months, and overall pleased)…

So, my question: I'm using usePaginatedQuery() to load realtime chat messages powered by Convex, and am seeking guidance on error handling.

I've always got an eye towards error handling which is "extra-strength" when it comes to anything involving network operations πŸ˜‰ but am finding a lack of any mention in the usePaginatedQuery() docs about error handling of any kind (in fact the only in-page search result for the string "error" highlights the API reference link in the docs nav πŸ˜… ).

For convenience: https://docs.convex.dev/database/pagination

So I'm wondering: are there any best practices that either end-users or even Convex team members have found to be especially useful and effective?

And, to piggy-back with a (100% relevant, at least!) feature request for the team: please consider adding an error key to the hook return value.
Was this page helpful?