Support Topics Documentation Slack YouTube Blog

Best way to retry HTTP requests?

Hi,
Since network access can fail for various reasons when doing things like completing a multi-page form. What is the accepted way of handling retries on Backendless?

Should I call the same function again from within the .catchError function?

Thanks,
Carlton

Hi @Carlton_Branch

Here is the Flutter documentation for Error Handling:
https://backendless.com/docs/flutter/shared_error_handling.html

It depends on what is the reason. If there is no internet connection you should inform the user and ask to enable WiFi. If there is a server problem alert the user with the error and allow to run the request again (add retry button maybe)

Best Regards,
Maksym

1 Like