We implemented the recommendations, but depending on the size of the product upsert, we are still getting this error in the production portal
The portal where there are 7566 products (IU), we get this error (it upserted 5960 products)
The portal where there are 1501 products (BAYFC), we do NOT get any error.
Here is how I set up the Client in the code
var client = new SquareClient.Builder()
.Environment(Square.Environment.Production)
.AccessToken(_venue.ApiToken)
.HttpClientConfig(config => config
.NumberOfRetries(5)
.Timeout(TimeSpan.FromSeconds(3600)))
.Build();
Do you have any suggestions on what we can do to prevent this error now matter how big the catalog is?
Please let me know if you need any more information.
Thanks,
Michael
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
https://developer.squareup.com/docs/squarebridge/business-central/onboard
Additional Documentation
Build and Manage a Simple Inventory
Using the Square .NET SDK
Catalog API Overview
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
Square does have rate limits but we don’t document the limits. We encourage you to handle the limit gracefully by building a retry mechanism. This mechanism should have an exponential backoff schedule to reduce requests when volume is necessary. Also some randomness wouldn’t hurt to avoid a thundering herd effect.
Thank you sir. Can you provide me with some documentation on how to see there was a rate limit fault so we can handle it? I assume there is a period of time we should wait before trying it again?
Are you referring to the API Logs to see if your getting 429
errors? Also here is our documentation on Rate Limiting.