{"record":{"id":"fd3fc5adbbc090e3","repo":"juanfont/headscale","slug":"id-is-required-w","errorCode":null,"errorMessage":"--id is required: %w","messagePattern":"--id is required: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/headscale/cli/oauth_client.go","lineNumber":150,"sourceCode":"\t\t\t\t\tstrings.Join(ptrStrs(c.Tags), \",\"),\n\t\t\t\t\tptrStr(c.Description),\n\t\t\t\t\tc.Created.Format(HeadscaleDateTimeFormat),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\treturn renderTable([]string{\"ID\", \"Scopes\", \"Tags\", \"Description\", colCreated}, rows)\n\t\t})\n\t},\n}\n\nvar deleteOAuthClientCmd = &cobra.Command{\n\tUse:     cmdDelete,\n\tShort:   \"Delete an OAuth client\",\n\tAliases: []string{\"remove\", aliasDel},\n\tRunE: func(cmd *cobra.Command, _ []string) error {\n\t\tid, _ := cmd.Flags().GetString(\"id\")\n\t\tif id == \"\" {\n\t\t\treturn fmt.Errorf(\"--id is required: %w\", errMissingParameter)\n\t\t}\n\n\t\tctx, client, cancel, err := newV2Client()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer cancel()\n\n\t\tresp, err := client.DeleteKeyWithResponse(ctx, oauthTailnet, id)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"deleting oauth client: %w\", err)\n\t\t}\n\n\t\terr = v2Error(resp.HTTPResponse.StatusCode, resp.Body)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/cmd/headscale/cli/oauth_client.go#L132-L168","documentation":"Error \"--id is required: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at cmd/headscale/cli/oauth_client.go:150 when the library encounters an invalid state.","commonSituations":"The --id flag is required for this OAuth client operation. Supply the client ID shown by the list command.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (--id is required); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (--id is required); 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"}