Unverified Commit 4bc18844 authored by Dr.Lt.Data's avatar Dr.Lt.Data Committed by GitHub
Browse files

Provide a better error message when attempting to execute the workflow with a missing node. (#3517)

parent 09e069ae
......@@ -622,8 +622,17 @@ def full_type_name(klass):
def validate_prompt(prompt):
outputs = set()
for x in prompt:
if 'class_type' not in prompt[x]:
error = {
"type": "invalid_prompt",
"message": f"Cannot execute due to a missing node",
"details": f"Node ID '#{x}'",
"extra_info": {}
}
return (False, error, [], [])
class_ = nodes.NODE_CLASS_MAPPINGS[prompt[x]['class_type']]
if hasattr(class_, 'OUTPUT_NODE') and class_.OUTPUT_NODE == True:
if hasattr(class_, 'OUTPUT_NODE') and class_.OUTPUT_NODE is True:
outputs.add(x)
if len(outputs) == 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment