stream-chat-ruby icon indicating copy to clipboard operation
stream-chat-ruby copied to clipboard

Identify Failures From Rate Limiting

Open tao-qian opened this issue 1 year ago • 0 comments

Hi!

We have a cron job that runs every evening syncing the chat configuration for all of our users. We saw that some of these requests would fail because of 429, according to the log available in the Stream dashboard Screenshot 2024-03-05 at 2 13 41 PM

I tried to repeatedly calling the following code to reproduce the rate limiting

 response = channel.update_partial({
    'name' => name,
    'image' => image,
 })
puts response

I was able to get the 429s to show up in the dashboard, but the responses being printed out don't seem to be any different from the normal ones. There was no exception being thrown by the SDK either, which I think would have been the better way for handling failed requests.

What's the recommended way to check if individual requests have failed because of rate limiting based on the response?

Thanks!

tao-qian avatar Mar 05 '24 22:03 tao-qian