{"record":{"id":"e6a00bfa1f966377","repo":"n8n-io/n8n","slug":"the-resource-resource-is-not-supported-e6a00b","errorCode":null,"errorMessage":"The resource \"${resource}\" is not supported!","messagePattern":"The resource \"(.+?)\" is not supported!","errorType":"validation","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/router.ts","lineNumber":36,"sourceCode":"\t\toperation,\n\t} as MiniMaxType;\n\n\tlet execute;\n\tswitch (miniMaxTypeData.resource) {\n\t\tcase 'audio':\n\t\t\texecute = audio[miniMaxTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'image':\n\t\t\texecute = image[miniMaxTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'text':\n\t\t\texecute = text[miniMaxTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'video':\n\t\t\texecute = video[miniMaxTypeData.operation].execute;\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 i = 0; i < items.length; i++) {\n\t\ttry {\n\t\t\tconst responseData = await execute.call(this, i);\n\t\t\treturnData.push(...responseData);\n\t\t} catch (error) {\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\treturnData.push({ json: { error: error.message }, pairedItem: { item: i } });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthrow new NodeOperationError(this.getNode(), error, {\n\t\t\t\titemIndex: i,\n\t\t\t\tdescription: error.description,\n\t\t\t});\n\t\t}\n\t}","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/router.ts#L18-L54","documentation":"Default branch of the MiniMax router switch on the resource parameter. Supported values are audio, image, text, video; any other value falls through to this throw. Under normal UI use the resource comes from a fixed options enum so this is effectively unreachable, but a hand-edited workflow JSON, a stale node definition, or a renamed resource can land here.","triggerScenarios":"Workflow JSON has resource set to a value not in {audio, image, text, video}; node definition and router shipped out of sync (new resource added to UI but not to router switch); corrupted/migrated workflow carrying a legacy or localized resource string; programmatic workflow injection with an invalid resource.","commonSituations":"User edited the workflow JSON directly; imported a workflow from a newer/older n8n version where resource names differ; localization leaked a translated resource value into the parameter; custom node fork renamed resources.","solutions":["Open the node in the n8n UI and re-select the resource from the dropdown to reset it to a valid enum value.","Inspect the workflow JSON's resource field and correct it to one of: audio, image, text, video.","Update the MiniMax node to the latest version to ensure the router and parameter enum agree.","If importing a workflow, re-map the resource field to the current enum after import."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const MINIMAX_RESOURCES = ['audio', 'image', 'text', 'video'] as const;\ntype MinimaxResource = typeof MINIMAX_RESOURCES[number];\nfunction isValidMinimaxResource(r: unknown): r is MinimaxResource {\n  return typeof r === 'string' && (MINIMAX_RESOURCES as readonly string[]).includes(r);\n}\n\n// before dispatching\nconst resource = this.getNodeParameter('resource', 0) as unknown;\nif (!isValidMinimaxResource(resource)) {\n  throw new NodeOperationError(\n    this.getNode(),\n    `Resource '${String(resource)}' is invalid. Supported: ${MINIMAX_RESOURCES.join(', ')}.`,\n  );\n}","typeGuard":"function isMinimaxResource(r: unknown): r is 'audio' | 'image' | 'text' | 'video' {\n  return r === 'audio' || r === 'image' || r === 'text' || r === 'video';\n}","tryCatchPattern":"// This is a programming/data error, not a transient one — do not retry.\n// Validate up front (see validationCode) so the user gets a clear message\n// instead of the generic default-branch throw.","preventionTips":["Always select resource from the node UI dropdown rather than editing JSON by hand.","After importing a workflow, re-select each MiniMax node's resource to reset it to a valid enum value.","Keep the MiniMax node updated so the UI enum and the router switch stay in sync.","If you fork the node, add new resources to both the parameter enum and the router switch in the same commit."],"tags":["minimax","router","resource","enum","workflow-json"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}