TanStackT
TanStack2y ago
2 replies
sad-indigo

Strange useInfiniteQuery behavior

Hi everyone!

I am experiencing strange behavior with useInfiniteQuery intermittently, with no root cause have been concluded so far (the issue has been there for a few months). Here is the error that are recorded in sentry (see attached picture). And also the code that calls useChatMessages (attached as well).

I assume since in the code snippets i provide, the useChatMessages will only be enabled if the activeChat is not falsy right? Then i still don't get why it still evers throw the error that are reported in Sentry. Is it possible that there is some cases which this scenario happens? If so, how do i design the code so that it doesn't ever throw unexpected error as i provide on the Sentry log? (In short, i want to make sure that the function called inside must respect the enabled options)

Thank you!
Screenshot_2024-02-24_at_12.39.57.png
code.png
Was this page helpful?