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

Fixes #81 - missing error information when running examples #82

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

garysieling
Copy link
Contributor

This lets you see the stack traces that come out of the AWS SDK. Unfortunately it doesn't show you the caller because the stack traces stop at the promise boundary.

If I run across another issue like this I'll make another PR - using async/await on the AWS promises might improve things, but that looks like a more involved change..

@@ -170,6 +170,8 @@ class Kes {
const destPath = path.join(this.config.kesFolder, this.cf_template_name);
console.log(`Template saved to ${destPath}`);
return fs.writeFileSync(destPath, cf);
}).catch((e) => {
console.log(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we would also want to re-throw the error here or else it would be swallowed when compileCF is called elsewhere, like uploadCF

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I added a throw

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 this pull request may close these issues.

3 participants