{"record":{"id":"bdd13bd36106becd","repo":"n8n-io/n8n","slug":"the-resource-resource-is-not-supported","errorCode":null,"errorMessage":"The resource \"${resource}\" is not supported","messagePattern":"The resource \"(.+?)\" is not supported","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/AlibabaCloud/actions/router.ts","lineNumber":60,"sourceCode":"\t\t\t}\n\t\t\tbreak;\n\t\tcase 'video':\n\t\t\tswitch (operation) {\n\t\t\t\tcase 'textToVideo':\n\t\t\t\t\texecute = video.textToVideo.execute;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'imageToVideo':\n\t\t\t\t\texecute = video.imageToVideo.execute;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t`The operation \"${operation}\" is not supported for resource \"${resource}\"`,\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new NodeOperationError(this.getNode(), `The resource \"${resource}\" is not supported`);\n\t}\n\n\tfor (let itemIndex = 0; itemIndex < items.length; itemIndex++) {\n\t\ttry {\n\t\t\tconst executionData = await execute.call(this, itemIndex);\n\t\t\treturnData.push(executionData);\n\t\t} catch (error) {\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\treturnData.push({\n\t\t\t\t\tjson: {\n\t\t\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t\t\t},\n\t\t\t\t\tpairedItem: { item: itemIndex },\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthrow new NodeOperationError(this.getNode(), error, {\n\t\t\t\titemIndex,","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/AlibabaCloud/actions/router.ts#L42-L78","documentation":"Thrown by the AlibabaCloud node router's outer switch default branch when the 'resource' parameter does not match 'text', 'image', or 'video'. This is the top-level dispatch guard: if the resource parameter value is unrecognized, the node cannot determine which sub-operation module to load and throws immediately before processing any items.","triggerScenarios":"The node's 'resource' parameter is set to any value other than 'text', 'image', or 'video'. This can occur after a node version change that renamed resources, when importing a workflow with a corrupt resource value, or when the resource parameter is set to a value from a different node entirely.","commonSituations":"Workflow JSON corruption or manual editing; node downgrade/upgrade that changed resource names; copy-paste error when building workflow definitions programmatically.","solutions":["Open the AlibabaCloud node in the editor and reselect the Resource dropdown — it must be 'Text', 'Image', or 'Video'.","Inspect the workflow JSON and verify the 'resource' parameter matches one of: 'text', 'image', 'video'.","Delete and recreate the node if the parameter cannot be corrected through the UI."],"exampleFix":"// before — resource value not recognized by any case\n// resource: 'chat'\n\n// after — use a supported resource\n// resource: 'text'","handlingStrategy":"validation","validationCode":"const VALID_RESOURCES = ['text', 'image', 'video'];\nconst resource = this.getNodeParameter('resource', 0) as string;\nif (!VALID_RESOURCES.includes(resource)) {\n  throw new Error(`Invalid resource '${resource}'. Valid: ${VALID_RESOURCES.join(', ')}`);\n}","typeGuard":"function isValidAlibabaCloudResource(r: string): r is 'text' | 'image' | 'video' {\n  return r === 'text' || r === 'image' || r === 'video';\n}","tryCatchPattern":null,"preventionTips":["Always select the resource through the node's Resource dropdown.","Avoid manual editing of the resource field in workflow JSON.","After importing a workflow, verify the AlibabaCloud node's resource value is valid before executing."],"tags":["configuration","node-parameters","router","alibabacloud"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}