{"record":{"id":"5bfd9cf17ccb1e25","repo":"microsoft/garnet","slug":"categoryname","errorCode":null,"errorMessage":"{categoryName}","messagePattern":"\\{categoryName\\}","errorType":"exception","errorClass":"ACLCategoryDoesNotExistException","httpStatus":null,"severity":"error","filePath":"libs/server/ACL/ACLParser.cs","lineNumber":210,"sourceCode":"                }\n                catch (ACLPasswordException exception)\n                {\n                    throw new ACLParsingException($\"{exception.Message}\");\n                }\n            }\n            else if (op.StartsWith(\"-@\", StringComparison.Ordinal) || op.StartsWith(\"+@\", StringComparison.Ordinal))\n            {\n                // Parse category name\n                string categoryName = op.Substring(2);\n\n                RespAclCategories category;\n                try\n                {\n                    category = ACLParser.GetACLCategoryByName(categoryName);\n                }\n                catch (KeyNotFoundException)\n                {\n                    throw new ACLCategoryDoesNotExistException(categoryName);\n                }\n\n                // Add or remove the category\n                if (op[0] == '-')\n                {\n                    user.RemoveCategory(category);\n                }\n                else\n                {\n                    user.AddCategory(category);\n                }\n            }\n            else if (op.StartsWith('-') || op.StartsWith('+'))\n            {\n                // Individual commands or command|subcommand pairs\n                string commandName = op.Substring(1);\n\n                if (TryParseCommandForAcl(commandName, out RespCommand command))","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/microsoft/garnet/blob/951b0fc6838721f89d102c2bbe1b914e8d39d700/libs/server/ACL/ACLParser.cs#L192-L228","documentation":"Thrown by ACLParser.ApplyACLOpToUser when a '+@<category>' or '-@<category>' operation names a category that GetACLCategoryByName cannot resolve (KeyNotFoundException). The recognized set is fixed: admin, bitmap, blocking, connection, dangerous, geo, hash, hyperloglog, fast, keyspace, list, pubsub, read, scripting, set, sortedset, slow, stream, string, transaction, vector, write, garnet, custom, all. Anything else raises ACLCategoryDoesNotExistException with the bad name.","triggerScenarios":"Using '+@allkeys' (that is a key rule, not a category), '+@write-only' (not a category), or a typo like '+@wrt'. Category names are matched case-insensitively but must be exact.","commonSituations":"Confusing key-pattern rules ('allkeys', '~*') with command categories; typos; using a Redis category name not implemented in Garnet; copy-pasting from a Redis config that references a category this build does not define.","solutions":["Use only the documented category names (see the categoryNames dictionary in ACLParser).","For key access use 'allkeys' or '~*' (these are key rules, handled separately), not '+@allkeys'.","Double-check spelling; category matching is case-insensitive but exact.","If extending categories, register the name in the categoryNames map before referencing it."],"exampleFix":"// before\nACLParser.ParseACLRule(\"user alice on +@allkeys\");\n\n// after\nACLParser.ParseACLRule(\"user alice on allkeys +@read\");","handlingStrategy":"validation","validationCode":"var known = new HashSet<string>(StringComparer.OrdinalIgnoreCase){\"admin\",\"bitmap\",\"blocking\",\"connection\",\"dangerous\",\"geo\",\"hash\",\"hyperloglog\",\"fast\",\"keyspace\",\"list\",\"pubsub\",\"read\",\"scripting\",\"set\",\"sortedset\",\"slow\",\"stream\",\"string\",\"transaction\",\"vector\",\"write\",\"garnet\",\"custom\",\"all\"};\nif (!known.Contains(categoryName)) throw new ArgumentException($\"Unknown ACL category: {categoryName}\");","typeGuard":"static bool IsKnownCategory(string name, HashSet<string> known) => known.Contains(name);","tryCatchPattern":"try { ACLParser.ParseACLRule(line, acl); }\ncatch (ACLCategoryDoesNotExistException ex) { logger.LogError(\"Unknown category: {Cat}\", ex.Message); }","preventionTips":["Reference only categories present in the ACLParser.categoryNames map.","Use key rules ('allkeys') for key access, not '+@allkeys'.","Keep a list of supported categories next to your config tooling."],"tags":["acl","parsing","category","configuration","validation"],"backgroundTag":null,"analyzedSha":"951b0fc6838721f89d102c2bbe1b914e8d39d700","analyzedAt":"2026-08-13T19:01:32.939Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}