{"record":{"id":"92fa7893abb7d937","repo":"projectdiscovery/nuclei","slug":"keys-must-be-string-or-interface-got-t","errorCode":null,"errorMessage":"keys must be []string or []interface{}, got %T","messagePattern":"keys must be \\[\\]string or \\[\\]interface(.+?), got %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/js/libs/redis/redis.go","lineNumber":224,"sourceCode":"\tkeysSlice := []string{}\n\tif keys != nil {\n\t\tswitch v := keys.(type) {\n\t\tcase []string:\n\t\t\tkeysSlice = v\n\t\tcase []interface{}:\n\t\t\tkeysSlice = make([]string, 0, len(v))\n\t\t\tfor _, item := range v {\n\t\t\t\tkeysSlice = append(keysSlice, fmt.Sprintf(\"%v\", item))\n\t\t\t}\n\t\tcase string:\n\t\t\t// the goja runtime zero-fills omitted trailing JS arguments with\n\t\t\t// the previous parameter's type, so a 4-arg call (old signature)\n\t\t\t// delivers \"\" here: treat it as no keys (backwards compat)\n\t\t\tif v != \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\"keys must be []string or []interface{}, got string\")\n\t\t\t}\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"keys must be []string or []interface{}, got %T\", keys)\n\t\t}\n\t}\n\n\t// Convert interface{} args to []interface{} for Eval (handle backwards\n\t// compatibility). Non-string items (numbers, booleans from JavaScript)\n\t// are stringified rather than dropped: Redis ARGV values are always\n\t// bulk strings on the Lua side, so \"123\"/\"true\" match JS expectations.\n\targsInterface := []interface{}{}\n\tif args != nil {\n\t\tswitch v := args.(type) {\n\t\tcase []string:\n\t\t\targsInterface = make([]interface{}, len(v))\n\t\t\tfor i, arg := range v {\n\t\t\t\targsInterface[i] = arg\n\t\t\t}\n\t\tcase []interface{}:\n\t\t\targsInterface = make([]interface{}, len(v))\n\t\t\tfor i, item := range v {","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/redis/redis.go#L206-L242","documentation":"Error \"keys must be []string or []interface{}, got %T\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/js/libs/redis/redis.go:224 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":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}