onError
handler in custom baseQuery
#3099
Answered
by
phryneas
abhieshekumar
asked this question in
Q&A
-
Hi, the current behaviour is that the query:() => ({
url: API_PATH,
method: "GET",
// execute once all retries have failed too. Right now it is getting executed for each retry
onError: ()=>{
showNotification(ERROR);
}
})
extraOptions: { maxRetries: NUMBER }, Is there a recommended approach to only execute the callback once all the retries have failed? |
Beta Was this translation helpful? Give feedback.
Answered by
phryneas
Jan 18, 2023
Replies: 1 comment 3 replies
-
There is no such thing as an |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
abhieshekumar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no such thing as an
onError
callback in RTK Query. I'm honestly a bit confused right now. Are you using a custombaseQuery
?