{"record":{"id":"2f3d4d558dd67d20","repo":"juanfont/headscale","slug":"resolving-auto-approvers-map-w","errorCode":null,"errorMessage":"resolving auto approvers map: %w","messagePattern":"resolving auto approvers map: %w","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"hscontrol/policy/v2/policy.go","lineNumber":306,"sourceCode":"\n\ttagOwnerMapHash := deephash.Hash(&tagMap)\n\n\ttagOwnerChanged := tagOwnerMapHash != pm.tagOwnerMapHash\n\tif tagOwnerChanged {\n\t\tlog.Debug().\n\t\t\tStr(\"tagOwner.hash.old\", pm.tagOwnerMapHash.String()[:8]).\n\t\t\tStr(\"tagOwner.hash.new\", tagOwnerMapHash.String()[:8]).\n\t\t\tInt(\"tagOwners.old\", len(pm.tagOwnerMap)).\n\t\t\tInt(\"tagOwners.new\", len(tagMap)).\n\t\t\tMsg(\"Tag owner hash changed\")\n\t}\n\n\tpm.tagOwnerMap = tagMap\n\tpm.tagOwnerMapHash = tagOwnerMapHash\n\n\tautoMap, exitSet, err := resolveAutoApprovers(pm.pol, pm.users, pm.nodes)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"resolving auto approvers map: %w\", err)\n\t}\n\n\tautoApproveMapHash := deephash.Hash(&autoMap)\n\n\tautoApproveChanged := autoApproveMapHash != pm.autoApproveMapHash\n\tif autoApproveChanged {\n\t\tlog.Debug().\n\t\t\tStr(\"autoApprove.hash.old\", pm.autoApproveMapHash.String()[:8]).\n\t\t\tStr(\"autoApprove.hash.new\", autoApproveMapHash.String()[:8]).\n\t\t\tInt(\"autoApprovers.old\", len(pm.autoApproveMap)).\n\t\t\tInt(\"autoApprovers.new\", len(autoMap)).\n\t\t\tMsg(\"Auto-approvers hash changed\")\n\t}\n\n\tpm.autoApproveMap = autoMap\n\tpm.autoApproveMapHash = autoApproveMapHash\n\n\texitSetHash := deephash.Hash(&exitSet)","sourceCodeStart":288,"sourceCodeEnd":324,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/hscontrol/policy/v2/policy.go#L288-L324","documentation":"Error \"resolving auto approvers map: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at hscontrol/policy/v2/policy.go:306 when the library encounters an invalid state.","commonSituations":"An autoApprovers entry could not be resolved. Ensure each auto approver is an alias (user, group, or tag) defined in the policy.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (resolving auto approvers map); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (resolving auto approvers map); 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"}