How to solve 429 "There is another request in flight trying to perform the same action"?

  • 24 September 2022
  • 0 replies
  • 488 views

Userlevel 5
Badge +9

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.


0 replies

Be the first to reply!

Reply