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

Improve error reporting when things fail #105

Merged
merged 3 commits into from
May 25, 2023
Merged

Conversation

serras
Copy link
Contributor

@serras serras commented May 25, 2023

Instead of blindly returning the "cannot deserialize" exception when an error arises in the OpenAI client (for example, because the API key is not valid), handle this and throw our own type of exception.

Ready for review @xebia-functional/team-ai

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.

I've also been getting that kind of exceptions lately, much better to have them typed and handled properly.
Thanks @serras!

@serras serras merged commit aefb677 into main May 25, 2023
@serras serras deleted the as-improve-error-reporting branch May 25, 2023 10:02
@nomisRev
Copy link
Contributor

@serras should we not do this as part of the typed errors?

@serras
Copy link
Contributor Author

serras commented May 25, 2023

@nomisRev yes, this may need a more proper handling in some way. This was just a quick-and-dirty fix so we can get more information while developing, instead of a generic error message.

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