{"record":{"id":"798241734ddbb8a7","repo":"MemPalace/mempalace","slug":"since-since-r-must-be-earlier-than-before-be-798241","errorCode":null,"errorMessage":"since ({since!r}) must be earlier than before ({before!r})","messagePattern":"since \\((.+?)\\) must be earlier than before \\((.+?)\\)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mempalace/mcp_server.py","lineNumber":3576,"sourceCode":"\n    Optional ``since`` / ``before`` filter by drawer ``filed_at`` (ISO date or\n    timestamp): ``since`` is inclusive, ``before`` is exclusive (#1128). A\n    drawer whose ``filed_at`` is missing or unparseable is excluded while a\n    date bound is active. The filter is applied in Python after the rows are\n    fetched — ChromaDB rejects string operands for ``$gte``/``$lt`` (1.5.7),\n    and ``filed_at`` is stored as an ISO string, so a server-side ``where``\n    comparison is not available.\n    \"\"\"\n    limit = max(1, min(limit, _MAX_RESULTS))\n    offset = max(0, offset)\n\n    try:\n        wing = _sanitize_optional_name(wing, \"wing\")\n        room = _sanitize_optional_name(room, \"room\")\n        since_dt = _parse_date_filter(since, \"since\")\n        before_dt = _parse_date_filter(before, \"before\")\n        if since_dt is not None and before_dt is not None and since_dt >= before_dt:\n            raise ValueError(f\"since ({since!r}) must be earlier than before ({before!r})\")\n    except ValueError as e:\n        return {\"error\": str(e)}\n\n    col = _get_collection()\n    if not col:\n        return _collection_error_or_no_palace()\n\n    try:\n        where = None\n        conditions = []\n\n        if wing:\n            conditions.append({\"wing\": wing})\n        if room:\n            conditions.append({\"room\": room})\n\n        if len(conditions) == 1:\n            where = conditions[0]","sourceCodeStart":3558,"sourceCodeEnd":3594,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/mcp_server.py#L3558-L3594","documentation":"Error \"since ({since!r}) must be earlier than before ({before!r})\" thrown in MemPalace/mempalace.","triggerScenarios":"Thrown at mempalace/mcp_server.py:3576 when the library encounters an invalid state.","commonSituations":"Date-window arguments were given in inverted order.","solutions":["Pass a `since` value earlier than the `before` value"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}