pulumi/pulumi · error
pinging stack webhook: %w
Error message
pinging stack webhook: %w
What it means
Wraps any error returned by the backend client when calling PingStackWebhook, which asks the Pulumi Cloud to deliver a test payload to the stack webhook. The CLI surfaces the underlying transport/API failure (webhook not found, unreachable endpoint, auth failure) under this prefix so the user knows the failure happened during the ping operation.
Source
Thrown at pkg/cmd/pulumi/stack/stack_webhook_ping.go:118
ctx, cmdutil.Diag(), pkgWorkspace.Instance, cmdBackend.DefaultLoginManager, stackFlag)
}
func runStackWebhookPing(
ctx context.Context,
w io.Writer,
factory stackWebhookPingClientFactory,
stackFlag string,
webhookName string,
render webhookPingRenderFunc,
) error {
c, stackID, err := factory(ctx, stackFlag)
if err != nil {
return err
}
delivery, err := c.PingStackWebhook(ctx, stackID, webhookName)
if err != nil {
return fmt.Errorf("pinging stack webhook: %w", err)
}
return render(w, delivery)
}
type webhookPingRenderFunc func(w io.Writer, d apitype.WebhookDelivery) error
func renderWebhookPingJSON(w io.Writer, d apitype.WebhookDelivery) error {
enc := json.NewEncoder(w)
enc.SetEscapeHTML(false)
enc.SetIndent("", " ")
return enc.Encode(d)
}
func renderWebhookPingText(w io.Writer, d apitype.WebhookDelivery) error {
ts := time.Unix(d.Timestamp, 0).UTC().Format(time.RFC3339)
fmt.Fprintf(w, "ID: %s\n", d.ID)View on GitHub (pinned to 793f7b2e16)
Solutions
- Verify the webhook name with `pulumi stack webhook list` and re-run the ping with the exact name
- Check the webhook endpoint is reachable and returning 2xx (curl the URL)
- Run `pulumi login` / refresh PULUMI_ACCESS_TOKEN to fix auth issues
- Retry once connectivity is confirmed; transient network errors are common
Defensive patterns
Strategy: retry
Validate before calling
// before calling: ensure webhook exists and endpoint reachable
names, _ := client.ListStackWebhooks(ctx, stackID)
if !slices.Contains(names, webhookName) { return fmt.Errorf("webhook %q not found", webhookName) }
resp, err := http.Head(webhookURL)
if err != nil || resp.StatusCode >= 400 { return fmt.Errorf("webhook endpoint unreachable") } Try / catch
// Go
if err := ping(); err != nil {
var retriable = strings.Contains(err.Error(), "connection")
if retriable { backoffRetry(ping, 3) }
return fmt.Errorf("pinging stack webhook: %w", err)
} Prevention
- Verify webhook names with `pulumi stack webhook list` before pinging
- Monitor webhook endpoint uptime; pings fail if the target is down
- Keep PULUMI_ACCESS_TOKEN fresh and scoped to the stack
When it happens
Trigger: Running `pulumi stack webhook ping <name>` when the webhook does not exist on the stack, the webhook endpoint is down or returns a non-success status, the backend API is unreachable, or the API token lacks access to the stack.
Common situations: Testing a webhook after rotating its secret or changing the target URL; typo'd webhook name; corporate proxy/firewall blocking outbound calls to the webhook URL; expired PULUMI_ACCESS_TOKEN.
Related errors
- removing stack webhook: %w
- getting environment draft definition: %w
- getting environment definition: %w
- resolving default org: %w
- getting latest configuration: %w
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/1a272ad8ef9fcbb7.
Report an issue: GitHub.