Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/peter-evans/create…
Browse files Browse the repository at this point in the history
…-pull-request-6.0.4
  • Loading branch information
andykenward authored Apr 18, 2024
2 parents efbb34f + 959fcf4 commit 13a926a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/delete/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/delete/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/common/batch-delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ export const batchDelete = async (
commentId
}
} catch (error) {
info(`${PREFIX} Deployment payload is not valid : ${JSON.stringify(error)}`)
const message = error instanceof Error ? error.message : 'unknown error'
info(`${PREFIX} Deployment payload is not valid : ${message}`)

return {
success: false,
error: JSON.stringify(error),
error: message,
environment: deployment.environment,
deploymentId: deployment.node_id
}
Expand Down
5 changes: 4 additions & 1 deletion src/delete/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ export async function run() {
.write()
}
} catch (error) {
setFailed(`${PREFIX} Error deleting deployments: ${JSON.stringify(error)}`)
const message =
error instanceof Error ? error.message : JSON.stringify(error)

setFailed(`${PREFIX} Error deleting deployments: ${message}`)
}
}

0 comments on commit 13a926a

Please sign in to comment.