Comments (2)
Hi @cs-pellsoftware,
hard to say, but I would guess it could have something to do with the rate limit. We have experienced it in our development team that an excessive calling of the same operation in a too short amount of time without respecting the restore rate returns the expected QuotaExceeded
error, but after some time it triggers the "access forbidden" error you also experienced. It seems as if Amazon starts to fully "block" these requests instead of returning the nicer "QuotaExceeded" error.
The client is taking care of rate limits to some extent, at least if you set auto_request_throttled
to true
(if you don't set it explicitly its true
as well, since thats the default). If its set and an operation returns a "QuotaExceeded" error, we will wait for the restore rate to pass (coming either from x-amzn-ratelimit-limit
header if given or as a fallback from the default restore rate defined in the SP docs) and then retry the request.
However what the client doesn't have (yet) is something like a "smart queue". I.e. lets say you start 20 requests of the same operation in parallel whereas the operation has a burst of 10 requests and a restore rate of 2 seconds. What will happen then is Amazon is returning a successful response for 10 of them and a QuotaExceeded
error for the remaining 10. These 10 requests will be retried after the restore rate of 2 seconds. This would cause 1 request to return a successful response and 9 of them being throttled once more. Next time 8 will be throttled again and so on.
So to sum up, I could imagine that this might have happened here for you, ultimately resulting in Amazon returning an "access forbidden" after some time (in your case after requesting about 300 asins).
So if that really is the issue here you would probably have to set auto_request_throttled
to false
and handle the rate limit logic on your end.
from amazon-sp-api.
As of version 0.7.1 we have a new option to overwrite the default restore_rate
for an operation by setting it inside the options
of .callAPI()
. This should bring some more flexibility to prevent such errors (compare issue #101 as well). So I think we can close this for the time being.
from amazon-sp-api.
Related Issues (20)
- fulfillmentOutbound / createFulfillmentOrder / destinationAddress does not accept DC as a valid stateOrRegion
- Inventory stock update HOT 3
- Issue of "Access to requested resource is denied." HOT 16
- TS exception HOT 1
- missing productPricing.getCompetitiveSummary from 2022-05-01 version HOT 4
- How can I best get the requestID and timestamp for SP-API support? HOT 1
- getFeed
- Add ability to add error handling middleware HOT 1
- Gracefully handle timeouts HOT 4
- [Bug]`orders.confirmShipment` error on parsing body response
- QueryType = "NEXT_TOKEN" perhaps not being sent to getShipmentItemsByShipmentId?
- Missing timeouts property in DownloadOptions interface HOT 1
- Need order info, tracking number and invoice data
- Is there a way to tell if a seller owns an ASIN or if the seller is a reseller?
- Credentials variables HOT 2
- Incorrect Header Check error downloading file HOT 1
- createFeed with POST_PRODUCT_DATA
- How to get raw request for SP API Developer Support? HOT 2
- Create Offer: Not Update Price, Quantity, and Merchant Shipping Group
- Authorization API v1 Deprecation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-sp-api.