Skip to content

Returning a rejected promise in router Resolver throws an error #17148

@jasonaden

Description

@jasonaden

Rejecting a resolve will cause an error ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'ngNavigationCancelingError' of null. This effectively stops navigation, but is an unintended error.

The problem with this error is that creating an instance of NgNavigationCancelingError is a private API. Therefore in user-land there doesn't seem to be a way to reject a resolve.

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