Fetch options are overridden on parallel requests #531
Labels
pending-author
[Issue] Awaiting further information or action from the issue author
pending-triage
[Issue] Ticket is pending to be prioritised
Describe the issue you're facing
On multiple parallel requests to the API are made (so that the client throttling is triggered) the the fetch params are not passed correctly to the
fetch
function.Looks like the reason this happens is that
fetchOptions
are preserved in the SbFetch instance and then used when calling fetch.Reproduction
https://stackblitz.com/edit/stackblitz-starters-xkyznv?file=index.js
Steps to reproduce
Here is a short example using node. I've added a custom
fetch
wrapper to observe the passed parameters:Output (after rateLimit is triggered all subsequent fetch calls have the params of the last
get
) :Expected Output:
System Info
Used Package Manager
npm
Error logs (Optional)
No response
Validations
The text was updated successfully, but these errors were encountered: