{"record":{"id":"17889afd054af20d","repo":"redis/redis-py","slug":"command-docs-is-intentionally-not-implemented-in-t","errorCode":null,"errorMessage":"COMMAND DOCS is intentionally not implemented in the client.","messagePattern":"COMMAND DOCS is intentionally not implemented in the client\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"redis/commands/core.py","lineNumber":1397,"sourceCode":"        self: AsyncClientProtocol, *args: str\n    ) -> Awaitable[CommandGetKeysAndFlagsResponse]: ...\n\n    def command_getkeysandflags(\n        self, *args: str\n    ) -> CommandGetKeysAndFlagsResponse | Awaitable[CommandGetKeysAndFlagsResponse]:\n        \"\"\"\n        Returns array of keys from a full Redis command and their usage flags.\n\n        For more information, see https://redis.io/commands/command-getkeysandflags\n        \"\"\"\n        return self.execute_command(\"COMMAND GETKEYSANDFLAGS\", *args)\n\n    def command_docs(self, *args):\n        \"\"\"\n        This function throws a NotImplementedError since it is intentionally\n        not supported.\n        \"\"\"\n        raise NotImplementedError(\n            \"COMMAND DOCS is intentionally not implemented in the client.\"\n        )\n\n    @overload\n    def config_get(\n        self: SyncClientProtocol, pattern: PatternT = \"*\", *args: PatternT, **kwargs\n    ) -> dict[str | None, str | None]: ...\n\n    @overload\n    def config_get(\n        self: AsyncClientProtocol, pattern: PatternT = \"*\", *args: PatternT, **kwargs\n    ) -> Awaitable[dict[str | None, str | None]]: ...\n\n    def config_get(\n        self, pattern: PatternT = \"*\", *args: PatternT, **kwargs\n    ) -> dict[str | None, str | None] | Awaitable[dict[str | None, str | None]]:\n        \"\"\"\n        Return a dictionary of configuration based on the ``pattern``","sourceCodeStart":1379,"sourceCodeEnd":1415,"githubUrl":"https://github.com/redis/redis-py/blob/6a6b581b48225afa0b76912d1028c6035baee932/redis/commands/core.py#L1379-L1415","documentation":"Raised by command_docs() (redis/commands/core.py:1397) which is a stub that unconditionally raises NotImplementedError. COMMAND DOCS returns documentation blobs designed for CLI/GUI tooling, not for client use, so the library intentionally refuses it. No arguments are accepted.","triggerScenarios":"Calling r.command_docs() or r.command_docs(\"GET\"). Any call raises immediately.","commonSituations":"Trying to build auto-documentation or help text from the server; assuming the python client exposes every COMMAND subcommand.","solutions":["Send it directly if truly needed: r.execute_command(\"COMMAND\", \"DOCS\", \"GET\")","Use r.command() / r.command_list() for metadata the client does support","Prefer the published Redis docs at https://redis.io/commands for human-readable help"],"exampleFix":"# before\nr.command_docs(\"GET\")\n# after\nr.execute_command(\"COMMAND\", \"DOCS\", \"GET\")","handlingStrategy":"fallback","validationCode":"# command_docs() is intentionally unimplemented; route to execute_command\ndef command_docs(r, *names):\n    return r.execute_command(\"COMMAND\", \"DOCS\", *names)","typeGuard":null,"tryCatchPattern":"try:\n    r.command_docs()\nexcept NotImplementedError:\n    docs = r.execute_command(\"COMMAND\", \"DOCS\")","preventionTips":["Treat command_docs() as unavailable.","If you need docs programmatically, call execute_command('COMMAND','DOCS',...).","Prefer redis.io/commands for human-facing documentation."],"tags":["command-introspection","notimplemented","intentional"],"backgroundTag":null,"analyzedSha":"6a6b581b48225afa0b76912d1028c6035baee932","analyzedAt":"2026-08-10T12:52:44.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}