Open jesusaguiardev opened 5 days ago
yes it does :)
would happily help you if provided any actual details
LOL idk how u got the issue bc i didn't click on Submit new issue @EskiMojo14 , i was going to change the title obviously with the proper error im having haha
haha, odd - feel free to edit it and I'll reopen
i updated the issue @EskiMojo14 thank you for taking my mistake with a lil of humor hahahaha
hmm, i don't see anything obvious - have you added some console logs to work out which return { error }
line is happening?
Yea, i even tried to return the error even before executing the query, like :(
queryFn: async ({ data, env }, api, extraOptions) => { return {error { ... } } }
One finding, on the useEffect i execute the validateDatablob, i have this logic
const result = await validateDataBlob({
data: {
icgid: "",
dataToDecode: data,
setMetada,
setError,
},
env: iframeEnv.env?.toUpperCase() || "DEV",
});
if (result?.data) {
setPurchasedProduct(result.data?.type);
setDecodedBlob(result?.data);
} else {
setIsDataBlobValid(false);
}
};
If i console log the result when i return an error, it has the error, but idk why the other out of the box states from RTK are not updating
do you have any other reducers that are listening for the rejected action (validateDataBlob.matchRejected) that might be throwing errors?
Hello!, i'm implementing an api with a single mutation using queryFn
From the docs I understand that, the queryFn is expected to return an object with the following pattern
{ error: {...} }
, but for some reason, when i return an error, the mutation doesn't finish and continues onpending
statethis is the code (i'll remove the non-essentials)
and for clarification, the success path works as expected, if i return
{ data: whatever }
the mutation finalize as expectedthis is how im using the mutation
and calling validateDataBlob inside a useEffect that has other logic, the versions i have are: