mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 16:54:03 +00:00
Alert workflow parsing error (#62)
* Alert workflow parsing error * nit
This commit is contained in:
@@ -112,7 +112,10 @@ export async function parseComfyWorkflow(data: string): Promise<ComfyWorkflow> {
|
||||
// Validate
|
||||
const result = await zComfyWorkflow.safeParseAsync(JSON.parse(data));
|
||||
if (!result.success) {
|
||||
throw fromZodError(result.error);
|
||||
// TODO: Pretty print the error on UI modal.
|
||||
const error = fromZodError(result.error);
|
||||
alert(`Invalid workflow against zod schema:\n${error}`);
|
||||
throw error;
|
||||
}
|
||||
return result.data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user