Skip to content

callOnEachEvent() swallows errors #119

@chmac

Description

@chmac

I run callOnEachEvent() to keep a long lived connection to our server to feed data into a bot. I see this in our logs:

zulip-js: Error while communicating with server: SyntaxError: Unexpected end of JSON input

But the function did not throw, so the loop never restarts. Reading the code of src/events_wrapper.js it seems like errors are caught and passed to logError(). But there's no logic in there, at least not that I can see, to recover from said errors. Is this handled somehow and I'm missing it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions