While using RevenueCat you may come across an error that has an HTTP status of 429 and a response body that looks like this:
{
"code": 7638,
"message": "There is another request in flight trying to perform the same action."
}
While a 429 Too Many Requests HTTP status code is frequently associated with rate limits, RevenueCat usually returns this error if multiple API requests were made simultaneously that are trying to update a single resource in the system.
For example, if you make a POST /receipts request and a GET /subscribers request for the same user at the same time, the GET /subscribers request will try to update the receipt with Apple/Google but it’s already being updated by the POST /receipt, so RevenueCat will block one of the requests to prevent data race conditions.
The solution to this is to simply retry the failed request a few seconds later, which will give RevenueCat a chance to complete any in-progress operation.