Skip to content

automatic retries on 500 doesn't happen #615

Discussion options

You must be logged in to vote

The retry feature is only for the useSWR hook, it's not available within the mutate function, if you use:

useSWR(key, fetcher)

And your fetcher throw an error It will retry it.

If you use

mutate(key, fetcher)

And your fetcher throw an error it will not retry and it will update the cache with the error.

You can implement retry yourself inside your fetcher function, an easy way is with async-retry.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SangeetAgarwal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants