Display an error when unsaved workflow gets executed with webhook

This commit is contained in:
Jan Oberhauser
2020-05-03 17:55:14 +02:00
parent a253192b0c
commit 42f6f4af2c
3 changed files with 12 additions and 15 deletions

View File

@@ -129,6 +129,10 @@ export class TestWebhooks {
return false;
}
if (workflow.id === undefined) {
throw new Error('Webhooks can only be added for saved workflows as an id is needed!');
}
// Remove test-webhooks automatically if they do not get called (after 120 seconds)
const timeout = setTimeout(() => {
this.cancelTestWebhook(workflowData.id.toString());