n8n-io/n8n · error · NodeOperationError

The type ${genericType} is not supported

Error message

The type ${genericType} is not supported

What it means

Thrown by genericCredentialRequest in the AI HTTP Request tool when the 'genericAuthType' parameter does not match any of the recognized generic auth types (httpBasicAuth, httpDigestAuth, httpHeaderAuth, httpQueryAuth, httpCustomAuth, httpTemplatedCustomAuth, oAuth1Api, oAuth2Api). It is the final fallthrough after every supported type is checked, meaning the node was configured with an authentication type the tool cannot wire up.

Source

Thrown at packages/@n8n/nodes-langchain/nodes/tools/ToolHttpRequest/utils.ts:146

	if (genericType === 'oAuth1Api') {
		const oAuth1 = await ctx.getCredentials('oAuth1Api', itemIndex);
		return async (options: IHttpRequestOptions) => {
			assertCredentialUrlAllowed(ctx, oAuth1, options);
			return await ctx.helpers.requestOAuth1.call(ctx, 'oAuth1Api', options);
		};
	}

	if (genericType === 'oAuth2Api') {
		const oAuth2 = await ctx.getCredentials('oAuth2Api', itemIndex);
		return async (options: IHttpRequestOptions) => {
			assertCredentialUrlAllowed(ctx, oAuth2, options);
			return await ctx.helpers.requestOAuth2.call(ctx, 'oAuth2Api', options, {
				tokenType: 'Bearer',
			});
		};
	}

	throw new NodeOperationError(ctx.getNode(), `The type ${genericType} is not supported`, {
		itemIndex,
	});
};

const predefinedCredentialRequest = async (ctx: ISupplyDataFunctions, itemIndex: number) => {
	const predefinedType = ctx.getNodeParameter('nodeCredentialType', itemIndex) as string;
	const additionalOptions = getOAuth2AdditionalParameters(predefinedType);
	const credentials = await ctx.getCredentials(predefinedType, itemIndex);

	return async (options: IHttpRequestOptions) => {
		assertCredentialUrlAllowed(ctx, credentials, options);
		return await ctx.helpers.httpRequestWithAuthentication.call(
			ctx,
			predefinedType,
			options,
			additionalOptions && { oauth2: additionalOptions },
		);
	};

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Open the node and re-pick 'Authentication' to one of the supported generic types (Generic Credential Type → httpBasicAuth / httpDigestAuth / httpHeaderAuth / httpQueryAuth / httpCustomAuth / httpTemplatedCustomAuth / oAuth1Api / oAuth2Api).
  2. If the credential is a predefined service credential (e.g. a named OAuth2), switch the node's credential mode to 'Predefined Credential Type' instead of 'Generic Credential Type'.
  3. If no auth is needed, set the credential type to 'None'.
  4. Recreate the credential from scratch if the stored genericAuthType value is corrupt.

Example fix

// In the node UI, set:
//   Authentication = 'Generic Credential Type'
//   Generic Auth Type = 'httpBasicAuth'  // (was an unsupported value)

// Programmatically, ensure the parameter is one of the allowed values:
const allowed = ['httpBasicAuth','httpDigestAuth','httpHeaderAuth','httpQueryAuth','httpCustomAuth','httpTemplatedCustomAuth','oAuth1Api','oAuth2Api'];
if (!allowed.includes(genericType)) throw new Error(`Unsupported: ${genericType}`);
Defensive patterns

Strategy: validation

Validate before calling

const ALLOWED_GENERIC = ['httpBasicAuth','httpDigestAuth','httpHeaderAuth','httpQueryAuth','httpCustomAuth','httpTemplatedCustomAuth','oAuth1Api','oAuth2Api'];
const genericType = ctx.getNodeParameter('genericAuthType', itemIndex) as string;
if (!ALLOWED_GENERIC.includes(genericType)) {
  throw new Error(`Unsupported genericAuthType '${genericType}'. Allowed: ${ALLOWED_GENERIC.join(', ')}`);
}

Type guard

function isSupportedGenericType(value: string): value is
  | 'httpBasicAuth' | 'httpDigestAuth' | 'httpHeaderAuth' | 'httpQueryAuth'
  | 'httpCustomAuth' | 'httpTemplatedCustomAuth' | 'oAuth1Api' | 'oAuth2Api' {
  return ['httpBasicAuth','httpDigestAuth','httpHeaderAuth','httpQueryAuth','httpCustomAuth','httpTemplatedCustomAuth','oAuth1Api','oAuth2Api'].includes(value);
}

Prevention

When it happens

Trigger: Setting the 'Authentication' parameter on the AI HTTP Request tool to a generic auth type whose name is not in the hardcoded list, or leaving genericAuthType set to a stale/renamed value after a node-definition change. Also fires if a custom community credential type name is passed where a generic type was expected.

Common situations: Selecting an auth type then deleting or renaming the underlying credential; upgrading nodes-langchain and finding a generic type was removed; pointing the node at a credential type that is actually a predefined (not generic) credential.

Related errors


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