pulumi/pulumi · error
listing stack webhooks: %w
Error message
listing stack webhooks: %w
What it means
This error wraps a failure from `ListStackWebhooks` in `pulumi stack webhook list`. It means the backend call that enumerates the stack's webhooks failed, so no webhook list can be rendered.
Source
Thrown at pkg/cmd/pulumi/stack/stack_webhook_list.go:108
) (stackWebhookListClient, client.StackIdentifier, error) {
return RequireCloudStack(ctx, cmdutil.Diag(), pkgWorkspace.Instance, cmdBackend.DefaultLoginManager, stackFlag)
}
func runStackWebhookList(
ctx context.Context,
w io.Writer,
factory stackWebhookListClientFactory,
stackFlag string,
render webhookListRenderFunc,
) error {
c, stackID, err := factory(ctx, stackFlag)
if err != nil {
return err
}
webhooks, err := c.ListStackWebhooks(ctx, stackID)
if err != nil {
return fmt.Errorf("listing stack webhooks: %w", err)
}
return render(w, webhooks)
}
type webhookListRenderFunc func(w io.Writer, webhooks []apitype.Webhook) error
// webhookListEnvelope is the JSON shape emitted by `pulumi stack webhook list --output=json`.
type webhookListEnvelope struct {
Webhooks []webhookJSON `json:"webhooks"`
Count int `json:"count"`
}
type webhookJSON struct {
ID string `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
Format string `json:"format"`View on GitHub (pinned to 793f7b2e16)
Solutions
- Check login state and connectivity: `pulumi whoami`, then re-run the command.
- Confirm the stack name/org is correct and the backend supports webhooks (Pulumi Cloud).
- Re-authenticate with `pulumi login` or refresh the access token; retry on transient 5xx errors.
Defensive patterns
Strategy: retry
Validate before calling
# check auth and reachability first pulumi whoami || pulumi login
Try / catch
webhooks, err := c.ListStackWebhooks(ctx, stackID)
if err != nil {
if isRetryable(err) { // 429/5xx/network
return retry.WithBackoff(3, func() error { _, err := c.ListStackWebhooks(ctx, stackID); return err })
}
return fmt.Errorf("listing stack webhooks: %w", err)
} Prevention
- Ensure you are logged in (`pulumi whoami`) before running list commands in scripts.
- Only use this command against backends that support stack webhooks (Pulumi Cloud).
- Add exponential backoff for transient 429/5xx responses in automation.
When it happens
Trigger: Running `pulumi stack webhook list` when the stack cannot be resolved, the cloud API is unreachable, or the token lacks permission to list webhooks for the stack/org.
Common situations: Not logged in or using an expired access token; pointing at a self-managed backend without webhook support; network/firewall blocking api.pulumi.com; wrong `--stack` reference.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- reading webhook %q: %w
- updating webhook %q: %w
- reading stack webhook: %w
- creating stack webhook: %w
- resolving deployment version %s: %w
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/ae6fdf435b161898.
Report an issue: GitHub.