{"record":{"id":"4ffad1a2ad7cbcf1","repo":"juanfont/headscale","slug":"nodeattrs-target-s-w","errorCode":null,"errorMessage":"nodeAttrs target %s: %w","messagePattern":"nodeAttrs target (.+?): %w","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"hscontrol/policy/v2/compiled.go","lineNumber":204,"sourceCode":"\tnodeList := make([]nodeIPs, 0, nodes.Len())\n\tfor _, n := range nodes.All() {\n\t\tnodeList = append(nodeList, nodeIPs{id: n.ID(), ips: n.IPs()})\n\t}\n\n\tif pol.RandomizeClientPort {\n\t\tfor _, ni := range nodeList {\n\t\t\tstamp(ni.id, tailcfg.NodeAttrRandomizeClientPort)\n\t\t}\n\t}\n\n\tfor _, na := range pol.NodeAttrs {\n\t\tif len(na.Attrs) == 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\tresolved, err := na.Targets.Resolve(pol, users, nodes)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"nodeAttrs target %s: %w\", na.Targets, err)\n\t\t}\n\n\t\tif resolved == nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tfor _, ni := range nodeList {\n\t\t\tif !slices.ContainsFunc(ni.ips, resolved.Contains) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tfor _, attr := range na.Attrs {\n\t\t\t\tstamp(ni.id, attr)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result, nil","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/hscontrol/policy/v2/compiled.go#L186-L222","documentation":"Error \"nodeAttrs target %s: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at hscontrol/policy/v2/compiled.go:204 when the library encounters an invalid state.","commonSituations":"A nodeAttrs target failed to compile. Check that nodeAttrs targets use supported users/groups and avoid unsupported autogroups.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (nodeAttrs target); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (nodeAttrs target); retry the operation after fixing the input, configuration, or environment.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}