[GH-ISSUE #1026] error.api.rate_exceeded returns status code 400 instead of 429 #11960

Closed
opened 2026-05-08 08:07:16 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @nichind on GitHub (Dec 29, 2024).
Original GitHub issue: https://github.com/imputnet/cobalt/issues/1026

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

No response

platform information

anything

additional context

No response

Originally created by @nichind on GitHub (Dec 29, 2024). Original GitHub issue: https://github.com/imputnet/cobalt/issues/1026 ### 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_
GiteaMirror added the bug label 2026-05-08 08:07:16 -05:00
Author
Owner

@hextor1 commented on GitHub (Dec 30, 2024):

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

<!-- gh-comment-id:2565410971 --> @hextor1 commented on GitHub (Dec 30, 2024): you can increase the rate limit cobalt has an feature that you can increase the rate limit via this command. RATELIMIT_MAX: 10000
Author
Owner

@nichind commented on GitHub (Dec 30, 2024):

how is that related to my issue

<!-- gh-comment-id:2565551738 --> @nichind commented on GitHub (Dec 30, 2024): how is that related to my issue
Author
Owner

@wukko commented on GitHub (Feb 11, 2025):

closed via #1066

<!-- gh-comment-id:2650197433 --> @wukko commented on GitHub (Feb 11, 2025): closed via #1066
Sign in to join this conversation.