diff --git a/mutation/index.ts b/mutation/index.ts index 0efb97537..1dee32b06 100644 --- a/mutation/index.ts +++ b/mutation/index.ts @@ -75,8 +75,8 @@ const mutation = if (ditchMutationsUntilRef.current <= mutationStartedAt) { setState({ error: error as Error, isMutating: false }) options.onError?.(error as Error, serializedKey, options) + throw error as Error } - throw error } }, // eslint-disable-next-line react-hooks/exhaustive-deps