n8n-io/n8n · error · NodeOperationError
Can't use a placeholder for the domain when using authentica
Error message
Can't use a placeholder for the domain when using authentication
What it means
Error "Can't use a placeholder for the domain when using authentication" thrown in n8n-io/n8n.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.ts:300
headers: {
// FIXME: This is a workaround to prevent the node from sending a default User-Agent (`n8n`) when the header is not set.
// Needs to be replaced with a proper fix after NODE-1777 is resolved
'User-Agent': undefined,
},
body: {},
// We will need a full response object later to extract the headers and check the response's content type.
returnFullResponse: true,
};
const authentication = this.getNodeParameter('authentication', itemIndex, 'none') as
| 'predefinedCredentialType'
| 'genericCredentialType'
| 'none';
if (authentication !== 'none') {
const domain = new URL(requestOptions.url).hostname;
if (domain.includes('{') && domain.includes('}')) {
throw new NodeOperationError(
this.getNode(),
"Can't use a placeholder for the domain when using authentication",
{
itemIndex,
description:
'This is for security reasons, to prevent the model accidentally sending your credentials to an unauthorized domain',
},
);
}
}
const httpRequest = await configureHttpRequestFunction(this, authentication, itemIndex);
const optimizeResponse = configureResponseOptimizer(this, itemIndex);
const rawRequestOptions: { [key: string]: string } = {
qs: '',
headers: '',
body: '',View on GitHub (pinned to 5ac6606e81)
When it happens
Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.ts:300 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/0c6e794aac353e4f.
Report an issue: GitHub.