{"record":{"id":"ca15f2992672c592","repo":"n8n-io/n8n","slug":"plain-generic-auth","errorCode":"PLAIN_GENERIC_AUTH","errorMessage":"'${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.","messagePattern":"'(.+?)' creates a new (.+?) credential\\. Set genericAuthType to 'httpTemplatedCustomAuth' instead — `Authorization: Bearer <token>` becomes the template (.+?)\\}\"\\}\\} — or credential setup will reject it\\. Plain generic types are only for reusing an existing credential\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/http-request-validator.ts","lineNumber":115,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// New plain generic credentials are steered to Templated Custom Auth: a\n\t\t// provider documenting `Authorization: Bearer <token>` reliably lures the\n\t\t// model into httpBearerAuth, and setup rejects that for new credentials.\n\t\tconst genericAuthType = params.genericAuthType;\n\t\tif (\n\t\t\tparams.authentication === 'genericCredentialType' &&\n\t\t\ttypeof genericAuthType === 'string' &&\n\t\t\tTEMPLATABLE_PLAIN_AUTH_TYPES.has(genericAuthType)\n\t\t) {\n\t\t\tconst credentials = (node.config as { credentials?: Record<string, unknown> } | undefined)\n\t\t\t\t?.credentials;\n\t\t\tconst credential = credentials?.[genericAuthType];\n\t\t\tif (credential === undefined || isNewCredentialSentinel(credential)) {\n\t\t\t\tissues.push({\n\t\t\t\t\tcode: 'PLAIN_GENERIC_AUTH',\n\t\t\t\t\tmessage: `'${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.`,\n\t\t\t\t\tseverity: 'warning',\n\t\t\t\t\tnodeName: node.name,\n\t\t\t\t\tparameterPath: 'genericAuthType',\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (params.contentType === 'json' && looksLikeXmlPayload(params.jsonBody)) {\n\t\t\tissues.push({\n\t\t\t\tcode: 'INVALID_PARAMETER',\n\t\t\t\tmessage: `'${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.`,\n\t\t\t\tseverity: 'error',\n\t\t\t\tnodeName: node.name,\n\t\t\t\tparameterPath: 'jsonBody',\n\t\t\t});\n\t\t}\n","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/http-request-validator.ts#L97-L133","documentation":"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.","triggerScenarios":"Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/http-request-validator.ts:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}