Skip to content

Commit

Permalink
chore(slab): print out reason of task failure
Browse files Browse the repository at this point in the history
  • Loading branch information
soonum committed Jul 3, 2024
1 parent 1d4b7b7 commit 265c721
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/slab.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 265c721

Please sign in to comment.