fixup: add more error info

This commit is contained in:
Yidadaa
2023-05-16 01:58:58 +08:00
parent aed6b34950
commit 71cbf86b2c
3 changed files with 16 additions and 6 deletions

View File

@@ -296,9 +296,7 @@ export const useChatStore = create<ChatStore>()(
botMessage.content !== Locale.Error.Unauthorized &&
!isAborted
) {
botMessage.content += "\n\n" + Locale.Store.Error;
} else if (botMessage.content.length === 0) {
botMessage.content = prettyObject(error);
botMessage.content += "\n\n" + prettyObject(error);
}
botMessage.streaming = false;
userMessage.isError = !isAborted;