{"record":{"id":"7470527438bb9839","repo":"garrytan/gstack","slug":"no-image-data-in-response-output-types-data-ou","errorCode":null,"errorMessage":"No image data in response. Output types: ${data.output?.map((o: any) => o.type).join(\", \") || \"none\"}","messagePattern":"No image data in response\\. Output types: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"design/src/generate.ts","lineNumber":81,"sourceCode":"      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, 200)}`);\n    }\n\n    const data = await response.json() as any;\n\n    const imageItem = data.output?.find((item: any) =>\n      item.type === \"image_generation_call\"\n    );\n\n    if (!imageItem?.result) {\n      throw new Error(\n        `No image data in response. Output types: ${data.output?.map((o: any) => o.type).join(\", \") || \"none\"}`\n      );\n    }\n\n    return {\n      responseId: data.id,\n      imageData: imageItem.result,\n    };\n  } finally {\n    clearTimeout(timeout);\n  }\n}\n\n/**\n * Generate a single mockup from a brief.\n */\nexport async function generate(options: GenerateOptions): Promise<GenerateResult> {\n  const apiKey = requireApiKey();","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/design/src/generate.ts#L63-L99","documentation":"Error \"No image data in response. Output types: ${data.output?.map((o: any) => o.type).join(\", \") || \"none\"}\" thrown in garrytan/gstack.","triggerScenarios":"Thrown at design/src/generate.ts:81 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"}