diff --git a/app/page.tsx b/app/page.tsx index 2136283..265b6d9 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -82,6 +82,12 @@ function ExportButton({ setHtml }: { setHtml: (html: string) => void }) { }); const json = await resp.json(); + + if (json.error) { + alert(json.error.message); + return; + } + const message = json.choices[0].message.content; const start = message.indexOf(""); const end = message.indexOf("");