From 566d2b9bf0d6095ea8559f9e8736d6ac405005ab Mon Sep 17 00:00:00 2001 From: John Jones Date: Wed, 12 Jun 2024 13:49:17 -0700 Subject: [PATCH] [INFREQ-643] Warn on RunTask failures --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 8ce4752..eb58ddd 100644 --- a/index.js +++ b/index.js @@ -74,6 +74,10 @@ module.exports = function (options, cb) { return taskRunner.runPromisified(params); }) .then((taskDefinition) => { + if (taskDefinition.failures) { + throw new Error("ECS RunTask returned failure messages", { cause: taskDefinition.failures }); + } + const taskArn = taskDefinition.tasks[0].taskArn; const taskId = taskArn.substring(taskArn.lastIndexOf('/') + 1); const formatter = new FormatStream();