-
Describe the bugWhen However, it causes the Suspense fallback to be displayed instead. Your minimal, reproducible examplehttps://stackblitz.com/edit/vitejs-vite-1b86rz?file=src/App.jsx Steps to reproduceLook at the text displayed on the repro. Expected behaviorIt should say "Error caught" because How often does this bug happen?Every time Screenshots or VideosNo response Platform
react-query version4.14.1 TypeScript versionNo response Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
So when we throw it, react thinks it's a promise and picks it up. You probably need to wrap this thing in a real promise, and resolve it in the |
Beta Was this translation helpful? Give feedback.
$.getJSON
is not returning a resolved or rejected promise. It returns an object that kinda looks like a promise? It's certainly not an error.So when we throw it, react thinks it's a promise and picks it up. You probably need to wrap this thing in a real promise, and resolve it in the
onSuccess
callback, and look at the status and reject it accordingly.