1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Add a node_errors to the /prompt error json response.

"node_errors" contains a dict keyed by node ids. The contents are a message
and a list of dependent outputs.
This commit is contained in:
comfyanonymous
2023-05-22 13:22:38 -04:00
parent 6cc450579b
commit ffc56c53c9
2 changed files with 18 additions and 13 deletions

View File

@@ -336,9 +336,9 @@ class PromptServer():
return web.json_response({"prompt_id": prompt_id})
else:
print("invalid prompt:", valid[1])
return web.json_response({"error": valid[1]}, status=400)
return web.json_response({"error": valid[1], "node_errors": valid[3]}, status=400)
else:
return web.json_response({"error": "no prompt"}, status=400)
return web.json_response({"error": "no prompt", "node_errors": []}, status=400)
@routes.post("/queue")
async def post_queue(request):