TanStackT
TanStack2y ago
3 replies
ill-bronze

Uncaught error on mutation

Hi!

I'm trying to catch rejected promise in mutation (onError) . But I get Uncaught error in promise.
Unless I wrap await handleCreateGeneral(formData) with try/catch.

So the question is: Isn't onError supposed to catch that error? The toast is triggered but the error is propagated further

Thanks
recipe-service.ts.png
use-create-general.ts.png
use-general-phase-submit.ts.png
Was this page helpful?