/prompt endpoint error is now in json format.

This commit is contained in:
comfyanonymous
2023-05-14 01:30:58 -04:00
parent 3a1f47764d
commit e7b9d2c02c
3 changed files with 5 additions and 6 deletions

View File

@@ -163,7 +163,7 @@ class ComfyApi extends EventTarget {
if (res.status !== 200) {
throw {
response: await res.text(),
response: await res.json(),
};
}
}

View File

@@ -1222,7 +1222,7 @@ export class ComfyApp {
try {
await api.queuePrompt(number, p);
} catch (error) {
this.ui.dialog.show(error.response || error.toString());
this.ui.dialog.show(error.response.error || error.toString());
break;
}