{"record":{"id":"7048d7b28c35e18a","repo":"pulumi/pulumi","slug":"getting-stack-schedule-w","errorCode":null,"errorMessage":"getting stack schedule: %w","messagePattern":"getting stack schedule: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/pulumi/stack/stack_schedule_get.go","lineNumber":101,"sourceCode":") (stackScheduleGetClient, client.StackIdentifier, error) {\n\treturn RequireCloudStack(ctx, cmdutil.Diag(), pkgWorkspace.Instance, cmdBackend.DefaultLoginManager, stackFlag)\n}\n\nfunc runStackScheduleGet(\n\tctx context.Context,\n\tw io.Writer,\n\tfactory stackScheduleGetClientFactory,\n\tstackFlag, scheduleID string,\n\trender scheduleGetRenderFunc,\n) error {\n\tc, stackID, err := factory(ctx, stackFlag)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tschedule, err := c.GetStackSchedule(ctx, stackID, scheduleID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"getting stack schedule: %w\", err)\n\t}\n\n\treturn render(w, schedule)\n}\n\ntype scheduleGetRenderFunc func(w io.Writer, schedule apitype.ScheduledAction) error\n\nfunc renderScheduleGetJSON(w io.Writer, schedule apitype.ScheduledAction) error {\n\tenc := json.NewEncoder(w)\n\tenc.SetEscapeHTML(false)\n\tenc.SetIndent(\"\", \"  \")\n\treturn enc.Encode(summarizeSchedule(schedule))\n}\n\nfunc renderScheduleGetText(w io.Writer, s apitype.ScheduledAction) error {\n\tsum := summarizeSchedule(s)\n\tline := func(label, value string) {\n\t\tfmt.Fprintf(w, \"%-10s %s\\n\", label+\":\", value)","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/cmd/pulumi/stack/stack_schedule_get.go#L83-L119","documentation":"The `pulumi stack schedule get` command fetches a single schedule via the cloud backend's GetStackSchedule API. Any failure from that API call (network problem, auth failure, schedule not found, permissions) is wrapped as \"getting stack schedule\". The command could not retrieve the schedule definition to render it.","triggerScenarios":"Running `pulumi stack schedule get <schedule-id>` when the schedule ID does not exist, the cloud API returns an error, the user lacks access to the stack, or there is a network/auth failure against the Pulumi Cloud service.","commonSituations":"Copy-pasted schedule ID with a typo or from a different stack/org; expired or missing login (`pulumi login`); backend outage; schedule deleted by someone else.","solutions":["Verify the schedule ID is correct and belongs to the selected stack: `pulumi stack schedule list`.","Confirm you are logged in and to the right backend/org: `pulumi whoami`, `pulumi login`.","Retry if the failure was transient (network/service outage).","Check the underlying wrapped error message for the root cause (404 vs 401 vs 5xx)."],"exampleFix":"// before\npulumi stack schedule get 123e4567-...   // getting stack schedule: not found\n// after\npulumi stack schedule list               # confirm the real ID\npulumi stack schedule get <correct-id>","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"out, err := run(\"pulumi\", \"stack\", \"schedule\", \"get\", id)\nif err != nil {\n    if strings.Contains(out+err.Error(), \"not found\") {\n        // verify ID against `pulumi stack schedule list`\n    }\n    return fmt.Errorf(\"schedule get failed: %w\", err)\n}","preventionTips":["Always list schedules first to obtain valid IDs.","Confirm login state (`pulumi whoami`) before API-dependent commands.","Copy schedule IDs from the correct stack/org."],"tags":["cli","schedules","api"],"backgroundTag":"api-request-failed","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}