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

fix(playground): improve playground error handling #5188

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

axiomofjoy
Copy link
Contributor

@axiomofjoy axiomofjoy commented Oct 24, 2024

error_handling.mp4

Improves error handling to yield an error type in the subscription so we can still return the final span at the end, even if an error occurs midway.

resolves #5187

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 24, 2024
exception_stacktrace=format_exc(),
)
)
yield ChatCompletionSubscriptionError(message=status_message)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't know if this matters as much on non SaaS, we could put a prefix on the error if it came from the llm provider, just to inform the user that the error did not happen in our system but happened in a third party api e.g., OpenAI API Error: status_message. Have to parse out where the error comes from which can be a pain though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good idea. We don't currently have a display name in the backend for the providers, just a provider key (e.g., openai without the nice casing). Let's punt until we have.

@axiomofjoy axiomofjoy merged commit b0436d7 into main Oct 25, 2024
35 checks passed
@axiomofjoy axiomofjoy deleted the xander/playground-errors branch October 25, 2024 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[playground] improve error handling
2 participants