{"record":{"id":"b3035c33b85c01f2","repo":"juanfont/headscale","slug":"building-ipset-for-q-w","errorCode":null,"errorMessage":"building IPSet for %q: %w","messagePattern":"building IPSet for %q: %w","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"hscontrol/policy/v2/sshtest.go","lineNumber":481,"sourceCode":"\t\t\t}\n\n\t\t\tcontinue\n\t\t}\n\n\t\tips, err := alias.Resolve(pol, users, nodes)\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"resolving destination %q: %w\", dstLabel, err)\n\t\t}\n\n\t\tif ips == nil || ips.Empty() {\n\t\t\temptyDsts = append(emptyDsts, dstLabel)\n\n\t\t\tcontinue\n\t\t}\n\n\t\tset, err := prefixesToIPSet(ips.Prefixes())\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"building IPSet for %q: %w\", dstLabel, err)\n\t\t}\n\n\t\tfor _, n := range nodes.All() {\n\t\t\tif !n.InIPSet(set) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tmatched = true\n\n\t\t\tif _, dup := seen[n.ID()]; dup {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tseen[n.ID()] = struct{}{}\n\t\t\tout = append(out, n)\n\t\t}\n\n\t\tif !matched {","sourceCodeStart":463,"sourceCodeEnd":499,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/hscontrol/policy/v2/sshtest.go#L463-L499","documentation":"Error \"building IPSet for %q: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at hscontrol/policy/v2/sshtest.go:481 when the library encounters an invalid state.","commonSituations":"Building the IP set for a policy alias failed. Verify the alias resolves to valid hosts, users, tags, or prefixes.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (building IPSet for); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (building IPSet for); 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"}