Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nichind opened this issue Dec 29, 2024 · 2 comments
Open

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

nichind opened this issue Dec 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@nichind
Copy link

nichind commented Dec 29, 2024

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 nichind added the bug Something isn't working label Dec 29, 2024
@hextor1

This comment was marked as off-topic.

@nichind
Copy link
Author

nichind commented Dec 30, 2024

how is that related to my issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants