Skip to content

Commit 96a776d

Browse files
committed
fix: Extra error handling
1 parent c53114e commit 96a776d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/probot.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,17 @@ function setupEventHandlers(app: Probot) {
5353
});
5454
app.on(['pull_request.opened', 'pull_request.reopened', 'pull_request.labeled', 'pull_request.unlabeled'],
5555
async ctx => {
56-
await pullRequest(app, ctx);
56+
try {
57+
await pullRequest(app, ctx);
58+
} catch (e) {
59+
if (e instanceof Error) {
60+
if (e.message.startsWith('Although you appear to have the correct')) {
61+
app.log.info(`Error can not be prevented: ${e.message}`);
62+
return;
63+
}
64+
}
65+
throw e;
66+
}
5767
})
5868
app.on('issues.opened', async ctx => {
5969
const comment = ctx.payload.issue.body;

0 commit comments

Comments
 (0)