-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Amplify REST requests should not automatically retry on serverside errors #13093
Comments
Hi @severi Thank you for raising this issue. We'll bring this to the team's attention and see how we can address it, whether it be through changing the behavior or exposing a way to disable this behavior. |
any updates for this |
I'm picturing a badly-coded server that is starting to fail when it gets overloaded. Arbitrarily tripling the number of requests sent to it really doesn't seem helpful. |
I am using TanStack Query and would like to use its retrying system rather than amplify's. |
Checking to see if there has been an update on this bug? |
I see there was a PR opened a couple weeks ago. Any updates/movement on that? |
Any update on this issue? I see a PR for this issue has been open for 3 months now: #13641 |
Before opening, please confirm:
JavaScript Framework
Not applicable
Amplify APIs
REST API
Amplify Version
v6
Amplify Categories
api
Backend
None
Environment information
Describe the bug
Amplify should never automatically try to retry API requests if they fail on serverside errors (500, 502, 503, 504)
https://github.com/aws-amplify/amplify-js/blob/main/packages/core/src/clients/middleware/retry/defaultRetryDecider.ts#L26C4-L26C21
This behaviour is just plain wrong and should not exists OR at the very least should be possible to be disabled
Expected behavior
Api request fails once and is not retryed
Reproduction steps
server responds with error code 500, amplify post request automatically retries 2 times after the failed attempt
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: