Minor improvements to RespondToWebhook node

This commit is contained in:
Jan Oberhauser 2021-11-05 11:19:23 -06:00
parent 7b8d388d17
commit 8c4040dc5b
2 changed files with 10 additions and 7 deletions

View file

@ -40,6 +40,9 @@ class NodeTypesClass implements INodeTypes {
} }
getByNameAndVersion(nodeType: string, version?: number): INodeType { getByNameAndVersion(nodeType: string, version?: number): INodeType {
if (this.nodeTypes[nodeType] === undefined) {
throw new Error(`The node-type "${nodeType}" is not known!`);
}
return NodeHelpers.getVersionedTypeNode(this.nodeTypes[nodeType].type, version); return NodeHelpers.getVersionedTypeNode(this.nodeTypes[nodeType].type, version);
} }
} }

View file

@ -283,7 +283,7 @@ export class Wait implements INodeType {
description: 'The HTTP Response code to return', description: 'The HTTP Response code to return',
}, },
{ {
displayName: 'Respond When', displayName: 'Respond',
name: 'responseMode', name: 'responseMode',
type: 'options', type: 'options',
displayOptions: { displayOptions: {
@ -295,19 +295,19 @@ export class Wait implements INodeType {
}, },
options: [ options: [
{ {
name: 'Webhook received', name: 'Immediately',
value: 'onReceived', value: 'onReceived',
description: 'Returns directly with defined Response Code', description: 'As soon as this node executes',
}, },
{ {
name: 'Last node finishes', name: 'When last node finishes',
value: 'lastNode', value: 'lastNode',
description: 'Returns data of the last executed node', description: 'Returns data of the last-executed node',
}, },
{ {
name: 'Response Node finishes', name: 'Using \'Respond to Webhook\' node',
value: 'responseNode', value: 'responseNode',
description: 'Returns data the response node did set', description: 'Response defined in that node',
}, },
], ],
default: 'onReceived', default: 'onReceived',