Improve error message when cluster has not been configured
See original GitHub issueI tried to build the containers sample in examples and hadn’t set up the cluster.
$ pulumi preview
Previewing changes:
info:
info: /Users/donnam/go/src/github.com/pulumi/pulumi-cloud/aws/service.ts:461
info: throw new Error("Cannot create 'Service'. Missing cluster config 'cloud-aws:config:ecsClusterARN'");
info: ^
info: Error: Cannot create 'Service'. Missing cluster config 'cloud-aws:config:ecsClusterARN'
info: at Service (/Users/donnam/go/src/github.com/pulumi/pulumi-cloud/aws/service.ts:461:19)
info: at Object.<anonymous> (/Users/donnam/go/src/github.com/pulumi/pulumi-cloud/examples/containers/index.ts:7:13)
info: at Module._compile (module.js:570:32)
info: at Object.Module._extensions..js (module.js:579:10)
info: at Module.load (module.js:487:32)
info: at tryModuleLoad (module.js:446:12)
info: at Function.Module._load (module.js:438:3)
info: at Module.require (module.js:497:17)
info: at require (internal/module.js:20:19)
info: at main (/Users/donnam/go/src/github.com/pulumi/pulumi/sdk/nodejs/cmd/run/index.ts:130:9)
error: An error occurred while advancing the preview: an unhandled error occurred: Program exited with non-zero exit code: 1
Should instead show something like:
Cannot create ‘Service’ at index.ts:7. Missing cluster config ‘cloud-aws:config:ecsClusterARN’
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
An error occurred while creating the cluster and the nodes will ...
Hi,. I'm trying to deploy a Cluster with two nodes (WServer 2019 both / Domain Joined / Fresh Install) but it fails.
Read more >How do I resolve configuration change failures? - Elastic
Configuration change errors can occur when there is insufficient RAM configured for a data tier. In this case, the cluster typically also shows...
Read more >Common Error Messages - Troubleshoot | Consul
Troubleshoot issues based on the error message. Common errors result from failed actions, timeouts, multiple entries, bad and expired certificates, ...
Read more >How do I resolve cluster creation errors in Amazon EKS? - AWS
To resolve the preceding error, create the cluster again using the recommended Availability Zones from the error message. If you're provisioning ...
Read more >Resolving Errors Health Statuses on Supervisor Cluster ...
Resolving Errors Health Statuses on Supervisor Cluster During Initial Configuration Or Upgrade · Check the management network to verify that ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Strawman answer to my own question:
We should use
pulumi.RunErrorfor any any exception that indicates the user made a mistake. We should not use it in cases where there is an implementation bug that leads to a failure. Akin to 4xx vs. 5xx distinction in HTTP.Does that sound right? This is another thing we should add to a “Pulumi API Design Guidelines” doc.
How should we in general decide when to use that vs. not? Is there a reason not to always use it?