react-call@2.0.0-next.5
Pre-releasePatch Changes
-
86df7d7:
useMutationFlowno longer swallows throws from the user'smutationFn(ADR-0016). A rejectedmutationFnnow propagates as a normal unhandled promise rejection — visible in the dev console, observable bywindow.addEventListener('unhandledrejection', ...)and by telemetry tools (Sentry, Datadog) that hook into it.The hook's state-machine contract is unchanged:
.finallystill clearspendingand the in-flight guard on both fulfillment and rejection, so the trigger remains retry-ready. The dialog still stays open when amutationFndoesn't reachcall.end()— that has always been a property of the Call/Stack lifecycle, not of the swallow.If you want to react to a
mutationFnfailure (surface a toast, route to Sentry, etc.), wrap the body intry/catch:mutationFn: async (call) => { try { await api.delete(id); call.end(true); } catch (e) { toast.error(e); Sentry.captureException(e); // no call.end → dialog stays open for retry } };
Only relevant if you adopted
useMutationFlowfrom2.0.0-next.3onwards. The 1.x line never had the hook.