docs(Github Trigger Node): Add notice and more meaningful error around permissions (#5551)

This commit is contained in:
Jon 2023-03-08 16:04:45 +00:00 committed by GitHub
parent 2889e53b37
commit 89d25995c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,6 +56,13 @@ export class GithubTrigger implements INodeType {
},
],
properties: [
{
displayName:
'Only members with owner privileges for an organization or admin privileges for a repository can set up the webhooks this node requires.',
name: 'notice',
type: 'notice',
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
@ -531,6 +538,13 @@ export class GithubTrigger implements INodeType {
);
}
if (error.cause.httpCode === '404') {
throw new NodeOperationError(
this.getNode(),
'Check that the repository exists and that you have permission to create the webhooks this node requires',
);
}
throw error;
}