Committing Error Messages to the CosmosDB #1140
Unanswered
sydneybeckcook
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Does anyone know how to commit error messages to the DB? I have:
But I'm having trouble with the useLayoutEffect for SaveToDb. When an error is the first response back (like the user has hit their token limit), the appStateContext.state.currentChat is null, and I'm having a hard time inputting the error into the currentChat object. I got the error messages to commit to the DB by moving SaveToDB outside of the useLayoutEffect, but they were being upserted with a new conversationId because the old conversation Id was being lost somewhere.
Has anyone had any luck with this?
Beta Was this translation helpful? Give feedback.
All reactions