Skip to content

RTK Query: don't refetch on subscribe after error #1349

Answered by phryneas
nrmilstein asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for the late response - I actually had looked at the issues and not found this one again 😅

Honestly, I think I just missed this scenario conceptually when writing that part of the lib. Now the question is what the best behaviour would be. 🤔
I think the current behaviour makes sense, but we will probably need a way to opt out of those refresh retries - probably a refetchOnError option on hook level, endpoint level (and maybe even api level) that defaults to true but can be changed.

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@nrmilstein
Comment options

@phryneas
Comment options

@nrmilstein
Comment options

Answer selected by nrmilstein
Comment options

You must be logged in to vote
7 replies
@a-b-r-o-w-n
Comment options

@phryneas
Comment options

@smacpherson64
Comment options

@markerikson
Comment options

@smacpherson64
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants