{"record":{"id":"7fdff7657a0cc74c","repo":"n8n-io/n8n","slug":"the-type-generictype-is-not-supported","errorCode":null,"errorMessage":"The type ${genericType} is not supported","messagePattern":"The type (.+?) is not supported","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/tools/ToolHttpRequest/utils.ts","lineNumber":146,"sourceCode":"\tif (genericType === 'oAuth1Api') {\n\t\tconst oAuth1 = await ctx.getCredentials('oAuth1Api', itemIndex);\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\tassertCredentialUrlAllowed(ctx, oAuth1, options);\n\t\t\treturn await ctx.helpers.requestOAuth1.call(ctx, 'oAuth1Api', options);\n\t\t};\n\t}\n\n\tif (genericType === 'oAuth2Api') {\n\t\tconst oAuth2 = await ctx.getCredentials('oAuth2Api', itemIndex);\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\tassertCredentialUrlAllowed(ctx, oAuth2, options);\n\t\t\treturn await ctx.helpers.requestOAuth2.call(ctx, 'oAuth2Api', options, {\n\t\t\t\ttokenType: 'Bearer',\n\t\t\t});\n\t\t};\n\t}\n\n\tthrow new NodeOperationError(ctx.getNode(), `The type ${genericType} is not supported`, {\n\t\titemIndex,\n\t});\n};\n\nconst predefinedCredentialRequest = async (ctx: ISupplyDataFunctions, itemIndex: number) => {\n\tconst predefinedType = ctx.getNodeParameter('nodeCredentialType', itemIndex) as string;\n\tconst additionalOptions = getOAuth2AdditionalParameters(predefinedType);\n\tconst credentials = await ctx.getCredentials(predefinedType, itemIndex);\n\n\treturn async (options: IHttpRequestOptions) => {\n\t\tassertCredentialUrlAllowed(ctx, credentials, options);\n\t\treturn await ctx.helpers.httpRequestWithAuthentication.call(\n\t\t\tctx,\n\t\t\tpredefinedType,\n\t\t\toptions,\n\t\t\tadditionalOptions && { oauth2: additionalOptions },\n\t\t);\n\t};","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/tools/ToolHttpRequest/utils.ts#L128-L164","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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).","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'.","If no auth is needed, set the credential type to 'None'.","Recreate the credential from scratch if the stored genericAuthType value is corrupt."],"exampleFix":"// In the node UI, set:\n//   Authentication = 'Generic Credential Type'\n//   Generic Auth Type = 'httpBasicAuth'  // (was an unsupported value)\n\n// Programmatically, ensure the parameter is one of the allowed values:\nconst allowed = ['httpBasicAuth','httpDigestAuth','httpHeaderAuth','httpQueryAuth','httpCustomAuth','httpTemplatedCustomAuth','oAuth1Api','oAuth2Api'];\nif (!allowed.includes(genericType)) throw new Error(`Unsupported: ${genericType}`);","handlingStrategy":"validation","validationCode":"const ALLOWED_GENERIC = ['httpBasicAuth','httpDigestAuth','httpHeaderAuth','httpQueryAuth','httpCustomAuth','httpTemplatedCustomAuth','oAuth1Api','oAuth2Api'];\nconst genericType = ctx.getNodeParameter('genericAuthType', itemIndex) as string;\nif (!ALLOWED_GENERIC.includes(genericType)) {\n  throw new Error(`Unsupported genericAuthType '${genericType}'. Allowed: ${ALLOWED_GENERIC.join(', ')}`);\n}","typeGuard":"function isSupportedGenericType(value: string): value is\n  | 'httpBasicAuth' | 'httpDigestAuth' | 'httpHeaderAuth' | 'httpQueryAuth'\n  | 'httpCustomAuth' | 'httpTemplatedCustomAuth' | 'oAuth1Api' | 'oAuth2Api' {\n  return ['httpBasicAuth','httpDigestAuth','httpHeaderAuth','httpQueryAuth','httpCustomAuth','httpTemplatedCustomAuth','oAuth1Api','oAuth2Api'].includes(value);\n}","tryCatchPattern":null,"preventionTips":["Constrain the node parameter options to only the supported generic types so the UI cannot produce an invalid value.","Validate the selected auth type before calling configureHttpRequestFunction.","Use 'Predefined Credential Type' for service-specific credentials instead of the generic path."],"tags":["authentication","configuration","http-request-tool","ai-tool"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}