From 265c721b68e5dd339d5f34f1c1753013881f96e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Test=C3=A9?= Date: Mon, 1 Jul 2024 17:31:38 +0200 Subject: [PATCH] chore(slab): print out reason of task failure --- dist/index.js | 6 ++++++ src/slab.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/dist/index.js b/dist/index.js index 529d1dc..c35eaf4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -49777,6 +49777,12 @@ async function waitForInstance(taskId, taskName) { if (body[taskName].status.toLowerCase() === 'done') { await removeTask(taskId) return body + } else if (body[taskName].status.toLowerCase() === 'failed') { + await removeTask(taskId) + core.error( + `Instance task failed (details: ${body[taskName].status.details})` + ) + core.setFailed('Failure occurred while waiting for instance.') } } else { core.error( diff --git a/src/slab.js b/src/slab.js index f2fcf88..698e1a3 100644 --- a/src/slab.js +++ b/src/slab.js @@ -69,6 +69,12 @@ async function waitForInstance(taskId, taskName) { if (body[taskName].status.toLowerCase() === 'done') { await removeTask(taskId) return body + } else if (body[taskName].status.toLowerCase() === 'failed') { + await removeTask(taskId) + core.error( + `Instance task failed (details: ${body[taskName].status.details})` + ) + core.setFailed('Failure occurred while waiting for instance.') } } else { core.error(