diff --git a/packages/nodes-base/nodes/Github/GithubTrigger.node.ts b/packages/nodes-base/nodes/Github/GithubTrigger.node.ts index 09da267953..2dc53ee6c6 100644 --- a/packages/nodes-base/nodes/Github/GithubTrigger.node.ts +++ b/packages/nodes-base/nodes/Github/GithubTrigger.node.ts @@ -352,7 +352,17 @@ export class GithubTrigger implements INodeType { active: true, }; - const responseData = await githubApiRequest.call(this, 'POST', endpoint, body); + + let responseData; + try { + responseData = await githubApiRequest.call(this, 'POST', endpoint, body); + } catch (e) { + if (e.message.includes('[422]:')) { + throw new Error('A webhook with the identical URL exists already. Please delete it manually on Github!'); + } + + throw e; + } if (responseData.id === undefined || responseData.active !== true) { // Required data is missing so was not successful