Add user group resource to Slack Node (#2405)

This commit is contained in:
Ricardo Espinoza
2021-11-03 20:55:04 -04:00
committed by GitHub
parent 0f9edd666d
commit 3971e30aff
4 changed files with 491 additions and 5 deletions

View File

@@ -58,6 +58,12 @@ export async function slackApiRequest(this: IExecuteFunctions | IExecuteSingleFu
}
if (response.ok === false) {
if (response.error === 'paid_teams_only') {
throw new NodeOperationError(this.getNode(), `Your current Slack plan does not include the resource '${this.getNodeParameter('resource', 0) as string}'`, {
description: `Hint: Upgrate to the Slack plan that includes the funcionality you want to use.`,
});
}
throw new NodeOperationError(this.getNode(), 'Slack error response: ' + JSON.stringify(response));
}