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

fix: error object Object to show meaningful error message #275

Merged
merged 2 commits into from
Aug 3, 2020

Conversation

kakhaUrigashvili
Copy link
Contributor

Fixing issue when "[Error]: object Object” is thrown during deploy to show more meaningful error message.

Reproduce:

  1. ask deploy with lambda deployer
  2. remove lambda:UpdateFunctionConfiguration permission
  3. change something in .ask/ask-states.json (for example skillId)
  4. ask deploy or ask deploy --ignore-hash.

@@ -119,9 +120,10 @@ class MultiTasksView {
this.taskRunner.run().then((context) => {
callback(null, context);
}).catch((listrError) => {
// listError { errors: [], context } contains array of errors from tasks and all context
const errorMessage = listrError.errors
.map(e => e.resultMessage || e.message || e).join('\n');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

taking care of all possible ways we throw the error. In this specific situation the error was on resultMessage

Copy link
Contributor

@RonWang RonWang left a comment

Choose a reason for hiding this comment

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

Pls update with the double quotes and push the code~

lib/builtins/deploy-delegates/lambda-deployer/helper.js Outdated Show resolved Hide resolved
@kakhaUrigashvili kakhaUrigashvili merged commit fd4566d into develop Aug 3, 2020
@kakhaUrigashvili kakhaUrigashvili deleted the fix-object-object-error branch August 3, 2020 22:29
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.

2 participants