diff --git a/dist/index.js b/dist/index.js index b671b24..54dd0b9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -49775,15 +49775,17 @@ async function waitForInstance(taskId, taskName) { if (response.ok) { const body = await response.json() const task_status = body[taskName].status.toLowerCase() + if (task_status === 'done') { await removeTask(taskId) return body } else if (task_status === 'failed') { - await removeTask(taskId) core.error( - `Instance task failed (details: ${body[taskName].status.details})` + `Instance task failed (details: ${body[taskName].details})` ) core.setFailed('Failure occurred while waiting for instance.') + await removeTask(taskId) + break } } else { core.error( diff --git a/src/slab.js b/src/slab.js index fdbd27e..4b2f429 100644 --- a/src/slab.js +++ b/src/slab.js @@ -67,15 +67,17 @@ async function waitForInstance(taskId, taskName) { if (response.ok) { const body = await response.json() const task_status = body[taskName].status.toLowerCase() + if (task_status === 'done') { await removeTask(taskId) return body } else if (task_status === 'failed') { - await removeTask(taskId) core.error( - `Instance task failed (details: ${body[taskName].status.details})` + `Instance task failed (details: ${body[taskName].details})` ) core.setFailed('Failure occurred while waiting for instance.') + await removeTask(taskId) + break } } else { core.error(