diff --git a/src/action.ts b/src/action.ts index 1353ba7..568db09 100644 --- a/src/action.ts +++ b/src/action.ts @@ -117,7 +117,14 @@ async function main() { } } if (isPullRequest()) { - await updatePullRequestComment(octokit, owner, repo, branch, markdownReport); + try { + await updatePullRequestComment(octokit, owner, repo, branch, markdownReport); + } catch (e: unknown) { + error('Failed to update pull request comment'); + if (e instanceof Error) { + error(`Reason: ${e.message}`); + } + } } fs.unlinkSync(clBinary); success('Done!');