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

onError hook not called when an error occurs during streaming in useAssistant #1658

Open
vinayakakv opened this issue May 21, 2024 · 0 comments
Labels
ai/ui bug Something isn't working

Comments

@vinayakakv
Copy link

Description

The useAssistant hook exposes error state and an onError hook that is called whenever an error happens.

However, when an error happens during streaming, only error gets set; onError is not called.

We are using onError hook to set custom error state, which is cleared on reload. Thus, it would be good to have:

  1. onError being called on stream errors
  2. clearError returned as a hook value that makes the reload process easier.

Code example

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/ui bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants