garrytan/gstack · error
API error (${response.status}): ${error.slice(0, 200)}
Error message
API error (${response.status}): ${error.slice(0, 200)} What it means
Error "API error (${response.status}): ${error.slice(0, 200)}" thrown in garrytan/gstack.
Source
Thrown at design/src/generate.ts:71
type: "image_generation",
model: "gpt-image-2",
size,
quality,
}],
}),
signal: controller.signal,
});
if (!response.ok) {
const error = await response.text();
if (response.status === 403 && error.includes("organization must be verified")) {
throw new Error(
"OpenAI organization verification required.\n"
+ "Go to https://platform.openai.com/settings/organization to verify.\n"
+ "After verification, wait up to 15 minutes for access to propagate.",
);
}
throw new Error(`API error (${response.status}): ${error.slice(0, 200)}`);
}
const data = await response.json() as any;
const imageItem = data.output?.find((item: any) =>
item.type === "image_generation_call"
);
if (!imageItem?.result) {
throw new Error(
`No image data in response. Output types: ${data.output?.map((o: any) => o.type).join(", ") || "none"}`
);
}
return {
responseId: data.id,
imageData: imageItem.result,
};View on GitHub (pinned to 94993f7401)
When it happens
Trigger: Thrown at design/src/generate.ts:71 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12).
Data as JSON: /api/errors/1928a493d9f1d26e.
Report an issue: GitHub.