pythongosssss / ComfyUI-Custom-Scripts

Enhancements & experiments for ComfyUI, mostly focusing on UI features
MIT License
1.38k stars 104 forks source link

Added error handling to getWorkflow and getWorkflows in workflow.js #225

Open daniel-lewis-ab opened 3 months ago

daniel-lewis-ab commented 3 months ago

Test before pulling.

pythongosssss commented 3 months ago

This seems that it will just move the error to the next part of the calling function, e.g. if getWorkflows fails, PysssssWorkflows.load will then fail on if(this.workflows.length) as workflows is undefined What problem were you trying to solve here, or was it just to log the response error better?

daniel-lewis-ab commented 3 months ago

:thinking: I was hoping to have it fail gracefully if it doesn't get what it wants.

On Sun, Apr 7, 2024 at 8:08 AM pythongosssss @.***> wrote:

This seems that it will just move the error to the next part of the calling function, e.g. if getWorkflows fails, PysssssWorkflows.load will then fail on if(this.workflows.length) as workflows is undefined What problem were you trying to solve here, or was it just to log the response error better?

— Reply to this email directly, view it on GitHub https://github.com/pythongosssss/ComfyUI-Custom-Scripts/pull/225#issuecomment-2041482902, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC36LN7JVM3BWGN22FSLE2TY4FHNJAVCNFSM6AAAAABFSUXC7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGQ4DEOJQGI . You are receiving this because you authored the thread.Message ID: @.***>