Skip to content
New issue

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

docs: clarify if client supports retry #985

Open
MentalGear opened this issue Mar 5, 2024 · 1 comment
Open

docs: clarify if client supports retry #985

MentalGear opened this issue Mar 5, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@MentalGear
Copy link

Improve documentation

Does the client auto retry if a call fails?
Use case: Insert record into files table after a storage operation. If the insert record fails, the file is 'lost' in the storage.

The docs give no indication, but Supabase AI mentions wrongly:

const supabase = createClient(supabaseUrl, supabaseKey, {

retry: {

// Number of times to retry a failed request

// Default: 0

retries: 3,


// Number of milliseconds to wait before retrying a failed request

// Default: 1000

delay: 500,
@MentalGear MentalGear added the documentation Improvements or additions to documentation label Mar 5, 2024
@Hallidayo
Copy link

Hi @MentalGear - I just asked the same as you in the Supabase docs AI but I get a different response:

The Supabase Client does not have a built-in retry mechanism. However, you can use a third-party library like axios-retry to add retry functionality to your requests.

With axios-retry, you can configure the number of retries and the retry delay. By default, axios-retry retries requests that fail due to network errors or 5xx server responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants