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 chat error #2959

Merged
merged 6 commits into from
Apr 28, 2023
Merged

Handle chat error #2959

merged 6 commits into from
Apr 28, 2023

Conversation

notmd
Copy link
Collaborator

@notmd notmd commented Apr 28, 2023

Handle error when create prompter or assistant message

arg: assistant_arg,
});
} catch (e) {
if (e instanceof OasstError) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This always is OasstError since we already transformed the error, the check to make TS happy

Copy link
Collaborator

@AbdBarho AbdBarho left a comment

Choose a reason for hiding this comment

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

Yes! we need more and better error loggin.

We could encapsulate the try catch logic better. That could be for a different PR.

@notmd notmd merged commit e82a717 into main Apr 28, 2023
@notmd notmd deleted the handle_chat_error branch April 28, 2023 16: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.

2 participants