Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad error message when not providing required parameter to data source #396

Closed
lukehoban opened this issue Jun 19, 2019 · 1 comment · Fixed by pulumi/pulumi#3048
Closed
Assignees
Milestone

Comments

@lukehoban
Copy link
Member

lukehoban commented Jun 19, 2019

This program:

import * as aws from "@pulumi/aws";
const ami = aws.getAmi({ owners: <any>undefined });
export let amiId = ami.then(a => a.id)

leads to:

Error: Invoke of 'aws:index/getAmi:getAmi' failed: undefined (undefined)

With verbose logs we see the real issue:

I0619 15:47:55.501296   17110 eventsink.go:63] eventSink::Debug(<{%reset%}>Invoke RPC finished: tok=aws:index/getAmi:getAmi; err: null, resp: ,,"owners": required field is not set<{%reset%}>)

We should be producing a useful error message here instead of undefined (undefined).

@lukehoban
Copy link
Member Author

This is possibly related to https://github.com/pulumi/pulumi-terraform/issues/147, though I think it's different and possibly more important since we don't even report the error at all.

@lukehoban lukehoban added this to the 0.26 milestone Jul 25, 2019
pgavlin added a commit to pulumi/pulumi that referenced this issue Aug 7, 2019
- Report all failures
- Use appropriate member functions to access failure details

Fixes pulumi/pulumi-terraform#396
pgavlin added a commit to pulumi/pulumi that referenced this issue Aug 8, 2019
- Report all failures
- Use appropriate member functions to access failure details

Fixes pulumi/pulumi-terraform#396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants