projectdiscovery/nuclei · error

args must be []string or []interface{}, got %T

Error message

args must be []string or []interface{}, got %T

What it means

Error "args must be []string or []interface{}, got %T" thrown in projectdiscovery/nuclei.

Source

Thrown at pkg/js/libs/redis/redis.go:251

	if args != nil {
		switch v := args.(type) {
		case []string:
			argsInterface = make([]interface{}, len(v))
			for i, arg := range v {
				argsInterface[i] = arg
			}
		case []interface{}:
			argsInterface = make([]interface{}, len(v))
			for i, item := range v {
				argsInterface[i] = fmt.Sprintf("%v", item)
			}
		case string:
			// zero-value padding from omitted JS arguments (see keys above)
			if v != "" {
				return nil, fmt.Errorf("args must be []string or []interface{}, got string")
			}
		default:
			return nil, fmt.Errorf("args must be []string or []interface{}, got %T", args)
		}
	}

	// Execute the Lua script with keys and args
	infoCmd := client.Eval(ctx, script, keysSlice, argsInterface...)

	if infoCmd.Err() != nil {
		return "", infoCmd.Err()
	}

	return infoCmd.Val(), nil
}

View on GitHub (pinned to 265b3a3dec)

When it happens

Trigger: Thrown at pkg/js/libs/redis/redis.go:251 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/2ffb01686f055df0. Report an issue: GitHub.