mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(n8n Form Trigger Node): Show basic authentication modal on wrong credentials (#10423)
This commit is contained in:
parent
5754fe4ec4
commit
0dc3e99b26
|
@ -170,8 +170,8 @@ export async function formWebhook(
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof WebhookAuthorizationError) {
|
if (error instanceof WebhookAuthorizationError) {
|
||||||
res.writeHead(error.responseCode, { 'WWW-Authenticate': 'Basic realm="Webhook"' });
|
res.setHeader('WWW-Authenticate', 'Basic realm="Enter credentials"');
|
||||||
res.end(error.message);
|
res.status(401).send();
|
||||||
return { noWebhookResponse: true };
|
return { noWebhookResponse: true };
|
||||||
}
|
}
|
||||||
throw error;
|
throw error;
|
||||||
|
|
Loading…
Reference in a new issue