Reputation: 96
Wondering if there are any costs when the response has statusCode = 429
CosmosException "x-ms-request-charge" header is 0, so seems that it is not charged, but wondering if there are not CosmosDB charges at all.
The same question can be extended to others such a 4xx such as 400 Bad Request
Upvotes: 0
Views: 237
Reputation: 71065
There is no Request Unit (RU) charge when you receive a 429, as a 429 is telling you that your query cannot be processed due to rate-limiting.
The one thing to do, once getting the 429, is wait the number of ms in that 429 message, before making the request again.
Cosmos DB doesn't have any other charges, aside from the per-hour cost of your various databases & collections.
Upvotes: 1