Open rajatkulkarni95 opened 1 year ago
@rajatkulkarni95 I just published v2 of the chat Hook, this new version has made it a lot easier to catch and handle errors.
Your feature request should now be possible to implement via an error
state that the hook could return. The logic already exists in the hook for catching the errors here, so really it's about representing those errors inside of the Hook's state.
This project does accept PRs if this is something you (or anyone else) are interested in contributing.
Check out my fork if interested in adding some error handling, just copy & paste and adapt it to your needs.
Changes from main:
Sometimes when the API fails the response back is something like
{content: '', role: ''}
Try catching
submitQuery
doesn't yield any results. Is there a way to catch errors and showcase to the end user?