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

Add ability to translate exceptions #481

Open
eyurtsev opened this issue Feb 22, 2024 Discussed in #473 · 3 comments
Open

Add ability to translate exceptions #481

eyurtsev opened this issue Feb 22, 2024 Discussed in #473 · 3 comments
Labels
enhancement New feature or request

Comments

@eyurtsev
Copy link
Collaborator

Expose exception translation capability to allow users to provide their own logic for translating server side errors into client side errors

# the message may contain sensitive information.

Discussed in #473

Originally posted by yw791772 February 21, 2024
Hi, I'm following the astream method in the langserve client code, and I have a try catch around the async sse code.
For testing purpose, I use an api key that has no quota, and I can see the 429 errors from the langserve app logs.
But when I looking at the decoded message from it on the client side, I only see 500 with internal server error.

Any guidance on how I can surface the 429 errors on the client side, so I can build specific around this error

@eyurtsev eyurtsev added the enhancement New feature or request label Feb 22, 2024
@yw791772
Copy link

yw791772 commented Feb 22, 2024

2 of the most common use cases I encountered:

  • 429 rate limiting
  • context too large, which could turn out to be hard to detect, for example: all I see is a 400 bad request from open ai

@eyurtsev
Copy link
Collaborator Author

#545

@philbo
Copy link

philbo commented Mar 21, 2024

@eyurtsev do you have any ideas about how to approach implementing this? I can try to contribute a solution

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

3 participants