mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Frame chat response error on web app in a more conversational form
Also indicate hitting dislike on the message should be enough to convey the issue to the developers.
This commit is contained in:
parent
893ae60a6a
commit
575ff103cf
1 changed files with 4 additions and 1 deletions
|
@ -264,7 +264,10 @@ export default function Chat() {
|
|||
|
||||
// Render error message as current message
|
||||
const errorMessage = (err as Error).message;
|
||||
currentMessage.rawResponse = `Encountered Error: ${errorMessage}. Please try again later.`;
|
||||
if (errorMessage.includes("Error in input stream"))
|
||||
currentMessage.rawResponse = `Woops! The connection broke while I was writing my thoughts down. Maybe try again in a bit or dislike this message if the issue persists?`;
|
||||
else
|
||||
currentMessage.rawResponse = `Umm, not sure what just happened. I see this error message: ${errorMessage}. Could you try again or dislike this message if the issue persists?`;
|
||||
|
||||
// Complete message streaming teardown properly
|
||||
currentMessage.completed = true;
|
||||
|
|
Loading…
Reference in a new issue