Skip to content

Missing error handling on async eventSubConnectAsync and pubsubConnect calls #68

@MadhuNimmo

Description

@MadhuNimmo

While analyzing the code using a static analysis tool, I noticed that the async calls to eventSubConnectAsync and pubsubConnect in app.js are not properly handled.

if (comfyJS.useEventSub) {
  eventSubConnectAsync(mainChannel, password);
} else {
  pubsubConnect(mainChannel, password);
}

Both of these are async functions, but:

They are not awaited

They are not followed by .catch(...)

There's no surrounding try/catch

This can cause unhandled promise rejections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions