throw an error comfyui is offline
parent
9159ebe8f7
commit
cc5a8924d1
|
|
@ -221,6 +221,11 @@ export async function postPromptAndGetBase64JsonResult(
|
||||||
}> {
|
}> {
|
||||||
try {
|
try {
|
||||||
const res = await comfyapi.comfy_api.prompt(prompt)
|
const res = await comfyapi.comfy_api.prompt(prompt)
|
||||||
|
if (!res) {
|
||||||
|
throw new Error(
|
||||||
|
`Unable to establish a connection to ComfyUI at the provided address: ${comfyapi.comfy_api.comfy_url}. Please ensure that ComfyUI is online and the URL is correct.`
|
||||||
|
)
|
||||||
|
}
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
const readable_error = comfyapi.comfy_api.getReadableError(res)
|
const readable_error = comfyapi.comfy_api.getReadableError(res)
|
||||||
throw new Error(readable_error)
|
throw new Error(readable_error)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue