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

Handle OpenAI Error server event accordingly #795

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

franciscodr
Copy link
Contributor

We are currently handling the Error server events coming from OpenAI as Unknown, preventing us from getting more accurate information about what went wrong during the interaction with the OpenAI API.

This pull request handles the errors accordingly, decoding the incoming JSON as an Error class instance. This change will allow us to respond better to the final user later.

Copy link
Contributor

@realdavidvega realdavidvega left a comment

Choose a reason for hiding this comment

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

LGTM!

@franciscodr franciscodr merged commit 4d72b0d into main Oct 10, 2024
6 checks passed
@franciscodr franciscodr deleted the handle-openai-error-event branch October 10, 2024 09:12
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

Successfully merging this pull request may close these issues.

3 participants