Skip to content

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

Closed
@vinayakakv

Description

@vinayakakv

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai/uibugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions