cobalt icon indicating copy to clipboard operation
cobalt copied to clipboard

error.api.rate_exceeded returns status code 400 instead of 429

Open nichind opened this issue 1 year ago • 2 comments

bug description

error.api.rate_exceeded returns with status code 400 instead of 429

Example response when hit ratelimit:

{'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '84', 'RateLimit-Policy': '20;w=60', 'RateLimit-Limit': '20', 'RateLimit-Remaining': '0', 'RateLimit-Reset': '37', 'Retry-After': '37'}

The response has "Retry-After" in it so i should be 429, no? I'm rewriting my python cobalt api wrapper, and it would be very convinient for that error to have proper status code

reproduction steps

  1. hit ratelimit

screenshots

No response

links

No response

platform information

anything

additional context

No response

nichind avatar Dec 29 '24 14:12 nichind

you can increase the rate limit cobalt has an feature that you can increase the rate limit via this command. RATELIMIT_MAX: 10000

hextor1 avatar Dec 30 '24 12:12 hextor1

how is that related to my issue

nichind avatar Dec 30 '24 14:12 nichind

closed via #1066

wukko avatar Feb 11 '25 09:02 wukko