{"record":{"id":"15e584e2af7d16bb","repo":"mem0ai/mem0","slug":"at-least-one-of-text-metadata-timestamp-or-expi-15e584","errorCode":null,"errorMessage":"At least one of text, metadata, timestamp, or expiration_date must be provided for update.","messagePattern":"At least one of text, metadata, timestamp, or expiration_date must be provided for update\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mem0/client/main.py","lineNumber":374,"sourceCode":"            **kwargs: Alternatively pass text, metadata, timestamp, or\n                      expiration_date as keyword args.\n\n        Returns:\n            Dict[str, Any]: The response from the server.\n\n        Raises:\n            ValueError: If none of text, metadata, timestamp, or expiration_date are provided.\n\n        Example:\n            >>> client.update(\"mem_123\", UpdateMemoryOptions(text=\"Updated text\"))\n            >>> client.update(\"mem_123\", text=\"Updated text\")\n            >>> client.update(\"mem_123\", expiration_date=None)\n        \"\"\"\n        payload = {**(options.model_dump(exclude_unset=True) if options else {}), **kwargs}\n        payload = {k: v for k, v in payload.items() if v is not None or k == \"expiration_date\"}\n\n        if not payload:\n            raise ValueError(\"At least one of text, metadata, timestamp, or expiration_date must be provided for update.\")\n\n        capture_client_event(\"client.update\", self, {\"memory_id\": memory_id, \"sync_type\": \"sync\"})\n        params = self._prepare_params()\n        response = self.client.put(f\"/v1/memories/{_encode_path_segment(memory_id)}/\", json=payload, params=params)\n        response.raise_for_status()\n        return response.json()\n\n    @api_error_handler\n    def delete(self, memory_id: str, delete_linked: bool = False) -> Dict[str, Any]:\n        \"\"\"Delete a specific memory by ID.\n\n        Args:\n            memory_id: The ID of the memory to delete.\n            delete_linked: When True, also delete the older memories this one\n                superseded (the v3 ``linked_memory_ids`` chain), transitively.\n                This is the delete-side counterpart of ``latest_only`` — it\n                stops a superseded memory from resurfacing after you delete the\n                current one. Defaults to False (only the given memory is deleted).","sourceCodeStart":356,"sourceCodeEnd":392,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0/client/main.py#L356-L392","documentation":"Error \"At least one of text, metadata, timestamp, or expiration_date must be provided for update.\" thrown in mem0ai/mem0.","triggerScenarios":"Thrown at mem0/client/main.py:374 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide at least one of text, metadata, timestamp, or expiration_date in the update() call."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}