Skip to content

What to do with unhandled broken promises? #140

@smarr

Description

@smarr

Currently, unhandled broken promises can lead to errors being swallowed.

However, we can't really add a standard behavior, because having that overwritten by a handler that's set later would be observably racy.

Node.js uses at the moment a warning that is displayed for such promises.
However, they seem to switch to a more radical approach and seem to want to shut down the whole application when such a broken promise is not handled.

That's derived from the follow example error message:

(node:2622) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: SOMns failed to starting WebSocket and/or HTTP Server

We could go a similar route, however, I am not sure that just killing the whole process is a good and robust approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImproves the implementation with something noteworthyhelp wantedWould be great if you could help out here.language-designNot everything is in the spec, sometimes, we need to decide what's best.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions