From d27204aea39f58e7f77b218468917a31523e863e Mon Sep 17 00:00:00 2001 From: Rob van der Leek <5324924+robvanderleek@users.noreply.github.com> Date: Mon, 23 Dec 2024 20:58:35 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Error=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/action.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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!');