Improve context share link error handling#167
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors chat provider detection to handle multiple URLs and introduces a more descriptive error messaging system for failed chat scrapes. Key changes include updating _detect_chat_provider to accept variadic arguments, adding support for claude.com, and implementing _chat_share_error_message to provide provider-specific feedback. Feedback suggests mapping internal provider IDs to proper display names (e.g., 'ChatGPT' instead of 'chatgpt') in error messages to improve the user experience.
| return ( | ||
| f"Failed to extract messages from the provided {provider} share link. " | ||
| "Please confirm the link is public, exists, and is not redirecting to a login or deleted-chat page." | ||
| ) |
There was a problem hiding this comment.
The error message uses the raw provider ID (e.g., 'chatgpt'), which results in lowercase names in the UI. Mapping these to their proper display names (e.g., 'ChatGPT', 'Claude', 'Gemini') would provide a more professional and user-friendly error message.
| return ( | |
| f"Failed to extract messages from the provided {provider} share link. " | |
| "Please confirm the link is public, exists, and is not redirecting to a login or deleted-chat page." | |
| ) | |
| names = {"chatgpt": "ChatGPT", "claude": "Claude", "gemini": "Gemini"} | |
| name = names.get(provider, provider.capitalize()) | |
| return ( | |
| f"Failed to extract messages from the provided {name} share link. " | |
| "Please confirm the link is public, exists, and is not redirecting to a login or deleted-chat page." | |
| ) |
|
Hi @Draconna thank you for the contribution. |
|
Thanks! I opened the landing page PR here: XortexAI/xmem-landing#7 Attached is a short Gemini demo for the updated error-handling path. In this local run, the public Gemini share link redirects/renders as unavailable to the scraper, and the importer now surfaces the new Gemini-specific message instead of the old generic parse error. If you have a known public Gemini or Claude share link that should scrape successfully in your environment, I’m happy to test that too. |
|
LGTM! |
|
Thank you @Draconna for the contribution |

Summary
Testing
Refs #155