{"record":{"id":"487cf44369358878","repo":"cli/cli","slug":"error-polling-for-permissions-w","errorCode":null,"errorMessage":"error polling for permissions: %w","messagePattern":"error polling for permissions: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/codespace/create.go","lineNumber":400,"sourceCode":"\t}\n\n\tvar answers struct {\n\t\tAccept string\n\t}\n\n\tif err := prompter.Ask(permsSurvey, &answers); err != nil {\n\t\treturn nil, fmt.Errorf(\"error getting answers: %w\", err)\n\t}\n\n\t// if the user chose to continue in the browser, open the URL\n\tif answers.Accept == choices[0] {\n\t\tif err := a.browser.Browse(allowPermissionsURL); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error opening browser: %w\", err)\n\t\t}\n\n\t\t// Poll until the user has accepted the permissions or timeout\n\t\tif err := a.pollForPermissions(ctx, createParams); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error polling for permissions: %w\", err)\n\t\t}\n\t} else {\n\t\t// If the user chose to create the codespace without the permissions,\n\t\t// we can continue with the create opting out of the additional permissions\n\t\tcreateParams.PermissionsOptOut = true\n\t}\n\n\tvar codespace *api.Codespace\n\terr := a.RunWithProgress(\"Creating codespace\", func() (err error) {\n\t\tcodespace, err = a.apiClient.CreateCodespace(ctx, createParams)\n\t\treturn\n\t})\n\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error creating codespace: %w\", err)\n\t}\n\n\treturn codespace, nil","sourceCodeStart":382,"sourceCodeEnd":418,"githubUrl":"https://github.com/cli/cli/blob/0eeec0b92edbe70199f9768522f831d3534f41ad/pkg/cmd/codespace/create.go#L382-L418","documentation":"Error \"error polling for permissions: %w\" thrown in cli/cli.","triggerScenarios":"Thrown at pkg/cmd/codespace/create.go:400 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network connectivity and retry; ensure the browser window was used to accept the permissions."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eeec0b92edbe70199f9768522f831d3534f41ad","analyzedAt":"2026-08-15T12:31:05.478Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}