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

Insufficient credit error has the same error code as bad requests #618

Open
dandv opened this issue Nov 28, 2024 · 0 comments
Open

Insufficient credit error has the same error code as bad requests #618

dandv opened this issue Nov 28, 2024 · 0 comments

Comments

@dandv
Copy link
Contributor

dandv commented Nov 28, 2024

When calling the Messages API with a valid request but insufficient credit, the API returns status c0de 400 and the message

Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.

Would it be more appropriate to return 402 Payment required, and reserve 400 for actually malformed requests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant