{"record":{"id":"c35e88de87962b50","repo":"garrytan/gstack","slug":"no-image-data-in-response","errorCode":null,"errorMessage":"No image data in response","messagePattern":"No image data in response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"design/src/evolve.ts","lineNumber":88,"sourceCode":"    });\n\n    if (!response.ok) {\n      const error = await response.text();\n      if (response.status === 403 && error.includes(\"organization must be verified\")) {\n        throw new Error(\n          \"OpenAI organization verification required.\\n\"\n          + \"Go to https://platform.openai.com/settings/organization to verify.\\n\"\n          + \"After verification, wait up to 15 minutes for access to propagate.\",\n        );\n      }\n      throw new Error(`API error (${response.status}): ${error.slice(0, 300)}`);\n    }\n\n    const data = await response.json() as any;\n    const imageItem = data.output?.find((item: any) => item.type === \"image_generation_call\");\n\n    if (!imageItem?.result) {\n      throw new Error(\"No image data in response\");\n    }\n\n    fs.mkdirSync(path.dirname(options.output), { recursive: true });\n    const imageBuffer = Buffer.from(imageItem.result, \"base64\");\n    fs.writeFileSync(options.output, imageBuffer);\n\n    const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);\n    console.error(`Generated (${elapsed}s, ${(imageBuffer.length / 1024).toFixed(0)}KB) → ${options.output}`);\n\n    console.log(JSON.stringify({\n      outputPath: options.output,\n      sourceScreenshot: options.screenshot,\n      brief: options.brief,\n    }, null, 2));\n  } finally {\n    clearTimeout(timeout);\n  }\n}","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/design/src/evolve.ts#L70-L106","documentation":"Error \"No image data in response\" thrown in garrytan/gstack.","triggerScenarios":"Thrown at design/src/evolve.ts:88 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"94993f74012782fd94416dd44b8314f6363a13a4","analyzedAt":"2026-08-12T04:06:23.140Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}