diff --git a/src/lib/helpers/stability.ts b/src/lib/helpers/stability.ts index 9f98f6f..94f2c52 100644 --- a/src/lib/helpers/stability.ts +++ b/src/lib/helpers/stability.ts @@ -38,11 +38,14 @@ export async function generateImage(prompt: string, negativePrompt: string) { } ); + if (!response.ok) { throw new Error(`Non-200 response: ${await response.text()}`) } const responseJSON = await response.json(); + console.log({ responseJSON }) + return responseJSON.artifacts[0]; }