Skip to content

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

Merged
kakhaUrigashvili merged 2 commits intodevelopfrom
fix-object-object-error
Aug 3, 2020
Merged

fix: error object Object to show meaningful error message#275
kakhaUrigashvili merged 2 commits intodevelopfrom
fix-object-object-error

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.

@kakhaUrigashvili kakhaUrigashvili requested a review from RonWang July 30, 2020 17:45
}).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~

@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