{"record":{"id":"ddb9e9736e1be743","repo":"n8n-io/n8n","slug":"no-images-were-generated","errorCode":null,"errorMessage":"No images were generated","messagePattern":"No images were generated","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/image/generate.operation.ts","lineNumber":150,"sourceCode":"\n\tif (options.seed !== undefined) {\n\t\tbody.seed = options.seed;\n\t}\n\n\tconst response = (await apiRequest.call(this, 'POST', '/image_generation', {\n\t\tbody,\n\t})) as ImageGenerationResponse;\n\n\tif (response.base_resp?.status_code !== 0) {\n\t\tthrow new NodeOperationError(\n\t\t\tthis.getNode(),\n\t\t\t`Image generation failed: ${response.base_resp?.status_msg || 'Unknown error'}`,\n\t\t);\n\t}\n\n\tconst imageUrls = response.data?.image_urls ?? [];\n\tif (imageUrls.length === 0) {\n\t\tthrow new NodeOperationError(this.getNode(), 'No images were generated');\n\t}\n\n\tconst results: INodeExecutionData[] = [];\n\n\tfor (let idx = 0; idx < imageUrls.length; idx++) {\n\t\tconst imageUrl = imageUrls[idx];\n\n\t\tif (downloadImage) {\n\t\t\tconst imageResponse = await this.helpers.httpRequest({\n\t\t\t\tmethod: 'GET',\n\t\t\t\turl: imageUrl,\n\t\t\t\tencoding: 'arraybuffer',\n\t\t\t\treturnFullResponse: true,\n\t\t\t});\n\n\t\t\tconst contentType = (imageResponse.headers?.['content-type'] as string) || 'image/png';\n\t\t\tconst fileContent = Buffer.from(imageResponse.body as ArrayBuffer);\n\t\t\tconst ext = contentType.includes('jpeg') || contentType.includes('jpg') ? 'jpg' : 'png';","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/image/generate.operation.ts#L132-L168","documentation":"Thrown when /image_generation returns success (status_code 0) but response.data.image_urls is missing or empty (defaulted to []). A response-shape inconsistency: success signalled, no images produced.","triggerScenarios":"Transient backend glitch returning success with no image URLs; API revision moving URLs to a different field; safety filter silently dropped all outputs while still reporting success; intermediary proxy stripping the image_urls array.","commonSituations":"Rare upstream inconsistency; safety filter edge case; non-official base URL filtering the response; prompt that the model declined to render without an explicit error.","solutions":["Retry the identical request.","Log the full response body to confirm image_urls is empty vs. located elsewhere.","Adjust the prompt to be more concrete and retry.","Verify the credentials base URL is the official MiniMax endpoint."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// No caller-side input prevents an upstream success-without-images glitch.\n// Validate only the request shape against the API contract.\nfunction validateImageGenRequestShape(body: IDataObject): string | null {\n  if (typeof body.prompt !== 'string' || body.prompt.length === 0) return 'body.prompt must be a non-empty string';\n  if (typeof body.model !== 'string') return 'body.model is required';\n  return null;\n}","typeGuard":"function hasImageUrls(r: unknown): r is { data: { image_urls: string[] } } {\n  const urls = (r as { data?: { image_urls?: unknown[] } })?.data?.image_urls;\n  return Array.isArray(urls) && urls.length > 0;\n}","tryCatchPattern":"async function imageGenWithRetry(apiRequest: any, body: IDataObject, maxAttempts = 3) {\n  for (let attempt = 0; attempt < maxAttempts; attempt++) {\n    const response = (await apiRequest.call(this, 'POST', '/image_generation', { body })) as ImageGenerationResponse;\n    if (response.base_resp?.status_code !== 0) {\n      throw new NodeOperationError(this.getNode(), `Image generation failed: ${response.base_resp?.status_msg || 'Unknown error'}`);\n    }\n    if ((response.data?.image_urls ?? []).length > 0) return response;\n    await sleep(1000 * (attempt + 1));\n  }\n  throw new NodeOperationError(this.getNode(), 'No images were generated');\n}","preventionTips":["Treat success-without-images as transient and retry with backoff.","Log the full response body to detect a real API field rename versus a glitch.","Use the official MiniMax base URL in credentials to avoid response-filtering proxies.","Keep prompts concrete to reduce silent no-output edge cases."],"tags":["minimax","image-generation","response-shape","transient"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}