mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-05 15:50:19 +01:00
🧭 fix: Robust 404 Conversation Not Found Redirect (#11853)
* fix: route to new conversation when conversation not found * Addressed PR feedback * fix: Robust 404 conversation redirect handling - Extract `isNotFoundError` utility to `utils/errors.ts` so axios stays contained in one place rather than leaking into route/query layers - Add `initialConvoQuery.isError` to the useEffect dependency array so the redirect actually fires when the 404 response arrives after other deps have already settled (was the root cause of the blank screen) - Show a warning toast so users understand why they were redirected - Add `com_ui_conversation_not_found` i18n key * fix: Enhance error handling in getResponseStatus function - Update the getResponseStatus function to ensure it correctly returns the status from error objects only if the status is a number. This improves robustness in error handling by preventing potential type issues. * fix: Improve conversation not found handling in ChatRoute - Enhance error handling when a conversation is not found by checking additional conditions before showing a warning toast. - Update the newConversation function to include model data and preset options, improving user experience during error scenarios. * fix: Log error details for conversation not found in ChatRoute - Added logging for the initial conversation query error when a conversation is not found, improving debugging capabilities and error tracking in the ChatRoute component. --------- Co-authored-by: Dan Lew <daniel@mightyacorn.com>
This commit is contained in:
parent
252a5cc7ca
commit
42718faad2
5 changed files with 66 additions and 4 deletions
|
|
@ -842,6 +842,7 @@
|
|||
"com_ui_controls": "Controls",
|
||||
"com_ui_conversation": "conversation",
|
||||
"com_ui_conversation_label": "{{title}} conversation",
|
||||
"com_ui_conversation_not_found": "Conversation not found",
|
||||
"com_ui_conversations": "conversations",
|
||||
"com_ui_convo_archived": "Conversation archived",
|
||||
"com_ui_convo_delete_error": "Failed to delete conversation",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue