mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-16 15:35:31 +01:00
feat: print nothing found when no search result.
fix: handle 404 of conversation fetch failed
This commit is contained in:
parent
370dc2dd8a
commit
d0d0a3d23e
3 changed files with 11 additions and 14 deletions
|
|
@ -31,7 +31,13 @@ export default function Chat() {
|
|||
newConversation();
|
||||
} else if (conversationId) {
|
||||
// fetch it from server
|
||||
conversationTrigger().then(setConversation);
|
||||
conversationTrigger()
|
||||
.then(setConversation)
|
||||
.catch(error => {
|
||||
console.error('failed to fetch the conversation');
|
||||
console.error(error);
|
||||
newConversation();
|
||||
});
|
||||
setMessages(null);
|
||||
} else {
|
||||
navigate(`/chat/new`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue