Skip to content

Commit

Permalink
fix: πŸ› Error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
robvanderleek committed Dec 23, 2024
1 parent 38734a6 commit d27204a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
Expand Down

0 comments on commit d27204a

Please sign in to comment.