We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UseApiDataOptions
Im currently using something like this in my project to retry a failed fetch.
const fetchData = async () => { let tries = 0 const maxTries = 3 const { refresh, error, data } = await useApiData( "path/to/api", ); while (error.value && tries < maxTries) { tries++; await refresh(); } if (error.value) { //handle error.. } return data.value }
My suggstion would be to add an option to UseApiDataOptions to enable retries if a fetch fails.
await useApiData( "path/to/api", { retries: 3 } )
Thanks !
The text was updated successfully, but these errors were encountered:
Good idea. PR welcome. 🙋♂️
Sorry, something went wrong.
a76a483
@klemenstraeger @m0zz094 @linshujuan This feature has been implemented: https://nuxt-api-party.byjohann.dev/guide/retries.html
No branches or pull requests
Describe the feature
Im currently using something like this in my project to retry a failed fetch.
My suggstion would be to add an option to
UseApiDataOptions
to enable retries if a fetch fails.Thanks !
Additional information
Final checks
The text was updated successfully, but these errors were encountered: