File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -625,13 +625,23 @@ def validate_prompt(prompt):
625
625
if 'class_type' not in prompt [x ]:
626
626
error = {
627
627
"type" : "invalid_prompt" ,
628
- "message" : f"Cannot execute due to a missing node" ,
628
+ "message" : f"Cannot execute because a node is missing the class_type property." ,
629
+ "details" : f"Node ID '#{ x } '" ,
630
+ "extra_info" : {}
631
+ }
632
+ return (False , error , [], [])
633
+
634
+ class_type = prompt [x ]['class_type' ]
635
+ class_ = nodes .NODE_CLASS_MAPPINGS .get (class_type , None )
636
+ if class_ is None :
637
+ error = {
638
+ "type" : "invalid_prompt" ,
639
+ "message" : f"Cannot execute because node { class_type } does not exist." ,
629
640
"details" : f"Node ID '#{ x } '" ,
630
641
"extra_info" : {}
631
642
}
632
643
return (False , error , [], [])
633
644
634
- class_ = nodes .NODE_CLASS_MAPPINGS [prompt [x ]['class_type' ]]
635
645
if hasattr (class_ , 'OUTPUT_NODE' ) and class_ .OUTPUT_NODE is True :
636
646
outputs .add (x )
637
647
You can’t perform that action at this time.
0 commit comments