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

Better catching of HTTP 401 errors #443

Open
caufieldjh opened this issue Aug 26, 2024 · 2 comments
Open

Better catching of HTTP 401 errors #443

caufieldjh opened this issue Aug 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@caufieldjh
Copy link
Member

Right now, if an API isn't accessible due to missing or incorrect credentials, litellm encounters the resulting 401 error. It looks like this:

Error code: 401 - {'error': {'message': 'Authentication Error, Invalid proxy server token passed', 'type': 'auth_error', 'param': 'None', 'code': '401'}}

That's fine, and that error should be raised, but when processing multiple documents with an extraction the process will just move on to the next document and yield an empty result for the current one. That isn't ideal in the case of missing auth as it won't resolve itself without user input.

Authentication errors should be a hard stop.

@caufieldjh
Copy link
Member Author

Might want to add 429 errors, too.

@caufieldjh
Copy link
Member Author

Related to #368

@caufieldjh caufieldjh added the enhancement New feature or request label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants
@caufieldjh and others