{"record":{"id":"2462d364faa38351","repo":"juanfont/headscale","slug":"setting-tags-w","errorCode":null,"errorMessage":"setting tags: %w","messagePattern":"setting tags: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/headscale/cli/nodes.go","lineNumber":482,"sourceCode":"\t\t)\n\t}\n\n\treturn tableData\n}\n\nvar tagCmd = &cobra.Command{\n\tUse:     \"tag\",\n\tShort:   \"Manage the tags of a node\",\n\tAliases: []string{\"tags\", \"t\"},\n\tRunE: clientRunE(func(ctx context.Context, client *clientv1.ClientWithResponses, cmd *cobra.Command, args []string) error {\n\t\tidentifier, _ := cmd.Flags().GetUint64(\"identifier\")\n\t\ttagsToSet, _ := cmd.Flags().GetStringSlice(\"tags\")\n\n\t\tresp, err := client.SetTagsWithResponse(ctx, strconv.FormatUint(identifier, util.Base10), clientv1.SetTagsJSONRequestBody{\n\t\t\tTags: &tagsToSet,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"setting tags: %w\", err)\n\t\t}\n\n\t\tif resp.StatusCode() != http.StatusOK {\n\t\t\treturn apiError(resp.StatusCode(), resp.ApplicationproblemJSONDefault)\n\t\t}\n\n\t\treturn printOutput(cmd, resp.JSON200.Node, \"Node updated\")\n\t}),\n}\n\nvar approveRoutesCmd = &cobra.Command{\n\tUse:   \"approve-routes\",\n\tShort: \"Manage the approved routes of a node\",\n\tRunE: clientRunE(func(ctx context.Context, client *clientv1.ClientWithResponses, cmd *cobra.Command, args []string) error {\n\t\tidentifier, _ := cmd.Flags().GetUint64(\"identifier\")\n\t\troutes, _ := cmd.Flags().GetStringSlice(\"routes\")\n\n\t\tresp, err := client.SetApprovedRoutesWithResponse(ctx, strconv.FormatUint(identifier, util.Base10), clientv1.SetApprovedRoutesJSONRequestBody{","sourceCodeStart":464,"sourceCodeEnd":500,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/cmd/headscale/cli/nodes.go#L464-L500","documentation":"Error \"setting tags: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at cmd/headscale/cli/nodes.go:482 when the library encounters an invalid state.","commonSituations":"Setting tags on the node failed. Ensure each tag starts with 'tag:' and that the caller is authorized as a tag owner by policy.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (setting tags); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (setting tags); 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"}