ComfyUI-Custom-Scripts icon indicating copy to clipboard operation
ComfyUI-Custom-Scripts copied to clipboard

Added error handling to getWorkflow and getWorkflows in workflow.js

Open daniel-lewis-ab opened this issue 1 year ago • 2 comments

Test before pulling.

daniel-lewis-ab avatar Apr 02 '24 04:04 daniel-lewis-ab

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?

pythongosssss avatar Apr 07 '24 14:04 pythongosssss

: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: @.***>

daniel-lewis-ab avatar Apr 08 '24 02:04 daniel-lewis-ab