n8n-io/n8n · error

PLAIN_GENERIC_AUTH

PLAIN_GENERIC_AUTH

Error message

'${node.name}' creates a new ${genericAuthType} credential. Set genericAuthType to 'httpTemplatedCustomAuth' instead — `Authorization: Bearer <token>` becomes the template {"headers":{"Authorization":"Bearer {{api_key}}"}} — or credential setup will reject it. Plain generic types are only for reusing an existing credential.

What it means

Error "'${node.name}' creates a new ${genericAuthType} credential. Set genericAuthType to 'httpTemplatedCustomAuth' instead — `Authorization: Bearer <token>` becomes the template {"headers":{"Authorization":"Bearer {{api_key}}"}} — or credential setup will reject it. Plain generic types are only for reusing an existing credential." thrown in n8n-io/n8n.

Source

Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/http-request-validator.ts:115

				}
			}
		}

		// New plain generic credentials are steered to Templated Custom Auth: a
		// provider documenting `Authorization: Bearer <token>` reliably lures the
		// model into httpBearerAuth, and setup rejects that for new credentials.
		const genericAuthType = params.genericAuthType;
		if (
			params.authentication === 'genericCredentialType' &&
			typeof genericAuthType === 'string' &&
			TEMPLATABLE_PLAIN_AUTH_TYPES.has(genericAuthType)
		) {
			const credentials = (node.config as { credentials?: Record<string, unknown> } | undefined)
				?.credentials;
			const credential = credentials?.[genericAuthType];
			if (credential === undefined || isNewCredentialSentinel(credential)) {
				issues.push({
					code: 'PLAIN_GENERIC_AUTH',
					message: `'${node.name}' creates a new ${genericAuthType} credential. Set genericAuthType to 'httpTemplatedCustomAuth' instead — \`Authorization: Bearer <token>\` becomes the template {"headers":{"Authorization":"Bearer {{api_key}}"}} — or credential setup will reject it. Plain generic types are only for reusing an existing credential.`,
					severity: 'warning',
					nodeName: node.name,
					parameterPath: 'genericAuthType',
				});
			}
		}

		if (params.contentType === 'json' && looksLikeXmlPayload(params.jsonBody)) {
			issues.push({
				code: 'INVALID_PARAMETER',
				message: `'${node.name}' sends an XML/SOAP payload but is configured as JSON. For XML, SOAP, CSV, or plain-text HTTP Request bodies, set sendBody=true, contentType='raw', put the payload in body, set rawContentType to an XML media type such as 'text/xml' or 'application/xml', and omit specifyBody/jsonBody/bodyParameters.`,
				severity: 'error',
				nodeName: node.name,
				parameterPath: 'jsonBody',
			});
		}

View on GitHub (pinned to 5ac6606e81)

When it happens

Trigger: Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/http-request-validator.ts:115 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/ca15f2992672c592. Report an issue: GitHub.