From 28d88c54889a9cb08a4793d2556339b02dd8c2c4 Mon Sep 17 00:00:00 2001 From: Michael Kret Date: Thu, 15 Aug 2024 09:37:30 +0300 Subject: [PATCH] fix --- packages/nodes-base/nodes/Form/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/Form/utils.ts b/packages/nodes-base/nodes/Form/utils.ts index 079ae4278c2d9..35f06496cef4c 100644 --- a/packages/nodes-base/nodes/Form/utils.ts +++ b/packages/nodes-base/nodes/Form/utils.ts @@ -170,8 +170,8 @@ export async function formWebhook( } } catch (error) { if (error instanceof WebhookAuthorizationError) { - res.writeHead(error.responseCode, { 'WWW-Authenticate': 'Basic realm="Webhook"' }); - res.end(error.message); + res.setHeader('WWW-Authenticate', 'Basic realm="Enter credentials"'); + res.status(401).send(); return { noWebhookResponse: true }; } throw error;