{"id":"6fe8cef343a1ba18","repo":"redis/redis-py","slug":"client-kill-filter-value-filter-val","errorCode":null,"errorMessage":"CLIENT KILL <filter> <value> ... ... <filter> <value> must specify at least one filter","messagePattern":"CLIENT KILL <filter> <value> \\.\\.\\. \\.\\.\\. <filter> <value> must specify at least one filter","errorType":"validation","errorClass":"DataError","httpStatus":null,"severity":"error","filePath":"redis/commands/core.py","lineNumber":798,"sourceCode":"        if skipme is not None:\n            if not isinstance(skipme, bool):\n                raise DataError(\"CLIENT KILL skipme must be a bool\")\n            if skipme:\n                args.extend((b\"SKIPME\", b\"YES\"))\n            else:\n                args.extend((b\"SKIPME\", b\"NO\"))\n        if _id is not None:\n            args.extend((b\"ID\", _id))\n        if addr is not None:\n            args.extend((b\"ADDR\", addr))\n        if laddr is not None:\n            args.extend((b\"LADDR\", laddr))\n        if user is not None:\n            args.extend((b\"USER\", user))\n        if maxage is not None:\n            args.extend((b\"MAXAGE\", maxage))\n        if not args:\n            raise DataError(\n                \"CLIENT KILL <filter> <value> ... ... <filter> \"\n                \"<value> must specify at least one filter\"\n            )\n        return self.execute_command(\"CLIENT KILL\", *args, **kwargs)\n\n    @overload\n    def client_info(self: SyncClientProtocol, **kwargs) -> dict[str, str | int]: ...\n\n    @overload\n    def client_info(\n        self: AsyncClientProtocol, **kwargs\n    ) -> Awaitable[dict[str, str | int]]: ...\n\n    def client_info(\n        self, **kwargs\n    ) -> dict[str, str | int] | Awaitable[dict[str, str | int]]:\n        \"\"\"\n        Returns information and statistics about the current","sourceCodeStart":780,"sourceCodeEnd":816,"githubUrl":"https://github.com/redis/redis-py/blob/da03cdc7e8731092b13e395605c3c1fb2de25de1/redis/commands/core.py#L780-L816","documentation":"Raised by client_kill when no filter arguments at all are supplied. The method builds an args list from _id, _type, skipme, addr, laddr, user, maxage; if that list is empty after all checks, it refuses to send a bare CLIENT KILL with no filter, since that would be a server-side protocol error.","triggerScenarios":"Calling r.client_kill() with no arguments. Calling r.client_kill(**{}) from dynamic kwargs that are all None. Passing only kwargs that aren't recognized filter parameters.","commonSituations":"Building client_kill calls dynamically from a dict where all keys end up None. Migration code that conditionally sets filters but none of the conditions match. Copying a code snippet that omitted the filter argument.","solutions":["Supply at least one filter: _id, _type, addr, laddr, user, maxage, or skipme.","If constructing filters dynamically, assert the relevant set is non-empty before calling.","To kill the current client's own connection, pass _id=client_id explicitly."],"exampleFix":"# before\nr.client_kill()\n# after\nr.client_kill(addr='10.0.0.5:6379')","handlingStrategy":"validation","validationCode":"filters = {'_id': _id, '_type': _type, 'addr': addr, 'laddr': laddr,\n           'user': user, 'maxage': maxage, 'skipme': skipme}\nif not any(v is not None for v in filters.values()):\n    raise ValueError('At least one client_kill filter must be provided')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never call client_kill unconditionally; always guard with at least one concrete filter.","When building filter kwargs from user input, validate that at least one resolved."],"tags":["client-management","validation","dataerror"],"analyzedSha":"da03cdc7e8731092b13e395605c3c1fb2de25de1","analyzedAt":"2026-08-04T20:26:47.563Z","schemaVersion":2}