Skip to content

catch-or-return options to report then(a, b) or then(null, b) #52

Closed
@Jessidhia

Description

@Jessidhia

makePromise().then(thenHandler, catchHandler) is incorrectly considered correct by the always-catch plugin when allowThen: true is specified.

While the catchHandler will handle a rejection of the Promise returned by makePromise(), it will not handle any rejection that happens in the thenHandler; it needs to be handled by its own catch handler, which could be a .then(null /* | undefined */, catchHandler) according to allowThen: true.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions