{"record":{"id":"149993beab7eae8c","repo":"langchain-ai/langgraph","slug":"invalid-filter-key-key-filter-keys-must-cont-149993","errorCode":null,"errorMessage":"Invalid filter key: '{key}'. Filter keys must contain only alphanumeric characters, underscores, dots, and hyphens.","messagePattern":"Invalid filter key: '(.+?)'\\. Filter keys must contain only alphanumeric characters, underscores, dots, and hyphens\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/checkpoint-sqlite/langgraph/store/sqlite/base.py","lineNumber":187,"sourceCode":"    return tuple(namespace.split(\".\"))\n\n\n_FILTER_PATTERN = re.compile(r\"^[a-zA-Z0-9_.-]+$\")\n\n\ndef _validate_filter_key(key: str) -> None:\n    \"\"\"Validate that a filter key is safe for use in SQL queries.\n\n    Args:\n        key: The filter key to validate\n\n    Raises:\n        ValueError: If the key contains invalid characters that could enable SQL injection\n    \"\"\"\n    # Allow alphanumeric characters, underscores, dots, and hyphens\n    # This covers typical JSON property names while preventing SQL injection\n    if not _FILTER_PATTERN.match(key):\n        raise ValueError(\n            f\"Invalid filter key: '{key}'. Filter keys must contain only alphanumeric characters, underscores, dots, and hyphens.\"\n        )\n\n\ndef _json_loads(content: bytes | str | orjson.Fragment) -> Any:\n    if isinstance(content, orjson.Fragment):\n        if hasattr(content, \"buf\"):\n            content = content.buf\n        else:\n            if isinstance(content.contents, bytes):\n                content = content.contents\n            else:\n                content = content.contents.encode()\n        return orjson.loads(cast(bytes, content))\n    elif isinstance(content, bytes):\n        return orjson.loads(content)\n    else:\n        return orjson.loads(content)","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/checkpoint-sqlite/langgraph/store/sqlite/base.py#L169-L205","documentation":"Error \"Invalid filter key: '{key}'. Filter keys must contain only alphanumeric characters, underscores, dots, and hyphens.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/checkpoint-sqlite/langgraph/store/sqlite/base.py:187 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}