{"record":{"id":"54277d466158f68f","repo":"microsoft/garnet","slug":"commandname","errorCode":null,"errorMessage":"{commandName}","messagePattern":"\\{commandName\\}","errorType":"exception","errorClass":"AclCommandDoesNotExistException","httpStatus":null,"severity":"error","filePath":"libs/server/ACL/ACLParser.cs","lineNumber":254,"sourceCode":"                        user.AddCommand(command);\n                    }\n                }\n                else if (IsValidCustomCommandName(commandName))\n                {\n                    // Modules may not be loaded yet (ACL file is parsed before LoadModules), so we\n                    // store the name on the user and resolve it later (startup pass, SETUSER, dispatch).\n                    if (op[0] == '-')\n                    {\n                        user.RemoveCustomCommand(commandName);\n                    }\n                    else\n                    {\n                        user.AddCustomCommand(commandName);\n                    }\n                }\n                else\n                {\n                    throw new AclCommandDoesNotExistException(commandName);\n                }\n            }\n            else if (op.Equals(\"~*\", StringComparison.Ordinal) || op.Equals(\"ALLKEYS\", StringComparison.OrdinalIgnoreCase))\n            {\n                // NOTE: No-op, because only wildcard key patterns are currently supported. If per-key key\n                // patterns are ever added, the GET scatter-gather fast path (NetworkGET_SG) must re-check\n                // ACL per key: it serves GETs past the first without returning through the per-command ACL\n                // check in ProcessMessages, which is only safe while key access is all-or-nothing.\n            }\n            else if (op.Equals(\"RESETKEYS\", StringComparison.OrdinalIgnoreCase))\n            {\n                // NOTE: No-op, because only wildcard key patterns are currently supported\n            }\n            else\n            {\n                throw new ACLUnknownOperationException(op);\n            }\n","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/microsoft/garnet/blob/951b0fc6838721f89d102c2bbe1b914e8d39d700/libs/server/ACL/ACLParser.cs#L236-L272","documentation":"Thrown by ACLParser.ApplyACLOpToUser when a '+<command>' or '-<command>' operation names a command that is neither a known built-in RespCommand (including subcommand 'CMD|SUB' and dotless module forms like 'RI.Create' -> 'RICREATE', plus SLAVEOF/CLUSTER|SET-CONFIG-EPOCH aliases) nor a valid custom command name (alphanumeric start, then alnum/._-| ). The offending command name is reported via AclCommandDoesNotExistException.","triggerScenarios":"Referencing '+@' as a command (handled as category), typos like '+grt' instead of '+get', or a module command name with illegal leading characters (e.g. '+.foo' which fails the custom-name legality check).","commonSituations":"Typo in a command name; referencing a module command before the module is loaded AND the name is not a legal custom name; using uppercase/lowercase inconsistently (parsing is case-insensitive, so case alone won't trigger this); pasting a Redis command not implemented in Garnet.","solutions":["Verify the command name is a real built-in or a legal custom/module name (alphanumeric first char).","For module commands not yet loaded, ensure the name matches the LegalFirstChars/LegalRestChars rules so it is stored as custom and resolved later.","Remove the leading '+/-' typo or stray characters.","Confirm the command exists in this Garnet build (some Redis commands are not implemented)."],"exampleFix":"// before\nACLParser.ParseACLRule(\"user alice on +grt\");\n\n// after\nACLParser.ParseACLRule(\"user alice on +get\");","handlingStrategy":"validation","validationCode":"string name = op.Substring(1);\nbool legalFirst = name.Length > 0 && (char.IsAsciiLetterOrDigit(name[0]));\nbool legalRest = name.Skip(1).All(c => char.IsAsciiLetterOrDigit(c) || c=='.'||c=='_'||c=='-'||c=='|');\nif (!legalFirst || !legalRest) throw new ArgumentException($\"Illegal command name: {name}\");","typeGuard":"static bool IsLegalCommandName(string name) =>\n    name.Length > 0 && char.IsAsciiLetterOrDigit(name[0]) &&\n    name.Skip(1).All(c => char.IsAsciiLetterOrDigit(c) || \"._-|\".Contains(c));","tryCatchPattern":"try { ACLParser.ParseACLRule(line, acl); }\ncatch (AclCommandDoesNotExistException ex) { logger.LogError(\"Unknown command: {Cmd}\", ex.Message); }","preventionTips":["Verify command names against the RespCommand enum or module registry.","For not-yet-loaded module commands, ensure the name is a legal custom name.","Watch for typos and stray characters."],"tags":["acl","parsing","command","configuration","validation"],"backgroundTag":null,"analyzedSha":"951b0fc6838721f89d102c2bbe1b914e8d39d700","analyzedAt":"2026-08-13T19:01:32.939Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}