Skip to content

Silent failure when exceding the call stack limit in async handlers #298

Description

@MendyBerger

In non async code, when overrunning the stack, we get a clear error. But when the code is async, the code fails silently.

Given the following code:

addEventListener('fetch', () => {
    foo();
});
function foo() {
    foo();
}

We get:

stderr [0] :: Exception while Exception in event listener for fetch
stderr [0] :: component.js:6:5 InternalError: too much recursion

But when making the fetch event handler async, the component just fails silently.

addEventListener('fetch', async () => {
    foo();
});
function foo() {
    foo();
}

The component fails, but there's no output to stderr at all.

This was happening somewhere deep in a library of a component I was trying to debug, but since there was no error it was really hard to figure out why the component shuts down mid execution

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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