{"record":{"id":"16b1d52779013c41","repo":"odysseus-dev/odysseus","slug":"llm-extraction-failed-str-e","errorCode":null,"errorMessage":"LLM extraction failed: {str(e)}","messagePattern":"LLM extraction failed: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":502,"severity":"error","filePath":"routes/memory/memory_routes.py","lineNumber":500,"sourceCode":"                        if s.get(\"text\"):\n                            s[\"text\"] = _strip_list_prefix(str(s[\"text\"]))\n                        normalized.append(s)\n                    else:\n                        normalized.append({\"text\": _strip_list_prefix(str(s)), \"category\": \"fact\"})\n                suggestions = normalized\n            else:\n                suggestions = []\n\n            return {\"suggestions\": suggestions, \"filename\": filename}\n\n        except json.JSONDecodeError:\n            # Fallback: split by lines, stripping any \"1.\", \"2)\" markdown-list\n            # numbering the model added so saved memories don't keep the prefix.\n            lines = [_strip_list_prefix(l.strip()) for l in raw.splitlines() if l.strip() and len(l.strip()) > 5]\n            return {\"suggestions\": [{\"text\": l, \"category\": \"fact\"} for l in lines[:20]], \"filename\": filename}\n        except Exception as e:\n            logger.error(f\"Memory import extraction failed: {e}\")\n            raise HTTPException(502, f\"LLM extraction failed: {str(e)}\")\n\n    @router.post(\"/{memory_id}/pin\")\n    def pin_memory(request: Request, memory_id: str, pinned: bool = Form(True)):\n        \"\"\"Pin or unpin a memory. Pinned memories are always included in context.\"\"\"\n        user = _owner(request)\n        all_mem = _load_for_update(memory_manager)\n        for i, memory in enumerate(all_mem):\n            if memory[\"id\"] == memory_id:\n                _verify_memory_owner(memory, user)\n                all_mem[i][\"pinned\"] = pinned\n                memory_manager.save(all_mem)\n                return {\"ok\": True, \"pinned\": pinned}\n        raise HTTPException(404, f\"Memory item {memory_id} not found\")\n\n    # Wildcard routes MUST come last — otherwise they swallow /import, /search, etc.\n    @router.get(\"/{memory_id}\")\n    def get_memory_item(request: Request, memory_id: str):\n        \"\"\"Get a specific memory item by ID.\"\"\"","sourceCodeStart":482,"sourceCodeEnd":518,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/memory/memory_routes.py#L482-L518","documentation":"Error \"LLM extraction failed: {str(e)}\" thrown in odysseus-dev/odysseus.","triggerScenarios":"Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.","commonSituations":"See trigger scenarios.","solutions":["Check that the configured LLM endpoint is reachable and retry.","Review server logs for the extraction error details."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}