Skip to content

Commit

Permalink
Merge a56adbe into 1e8dbb1
Browse files Browse the repository at this point in the history
  • Loading branch information
pickypg committed Sep 27, 2018
2 parents 1e8dbb1 + a56adbe commit 1f51411
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions shared/monitorDeployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = {
return callback();
})
.catch((error) => {
reject(new Error(error.message));
reject(error);
});
}, frequency);
},
Expand All @@ -66,8 +66,7 @@ module.exports = {
const throwErrorIfDeploymentFails = (deployment) => {
if (deployment.operation.error && deployment.operation.error.errors.length) {
const errorCode = deployment.operation.error.errors[0].code;
const parsedMessage = JSON.parse(deployment.operation.error.errors[0].message);
const parsedDetails = JSON.stringify(parsedMessage);
const parsedDetails = deployment.operation.error.errors[0].message;
const errorMessage = [
`Deployment failed: ${errorCode}\n\n`,
` ${parsedDetails}`,
Expand Down

0 comments on commit 1f51411

Please sign in to comment.