Open severi opened 3 months ago
Hi @severi Thank you for raising this issue. We were able to reproduce the 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. Is it even possible currently to disable amplify api retrying completely?
Checking to see if there has been an update on this bug?
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
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