Skip to content

Bad plain object handling as PromiseRejectionEvent reason #171

Description

@FeironoX5

Currently when a promise is rejected with a plain object instead of an Error Promise.reject({ code: 42, detail: 'oops' }), the catcher loses the object content - String(obj) produces "[object Object]".

The console catcher also falls back to event.reason?.message || String(event.reason), which either picks up an accidental message property or produces the same useless string.

Image

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