Skip to content

Do not alter exception thrown from selector #1433

Closed
@Dema

Description

@Dema

Do you want to request a feature or report a bug?
bug

What is the current behavior?

useSelector extracts .message field from thrown exception in https://github.com/reduxjs/react-redux/blob/master/src/hooks/useSelector.js#L60 hiding original exception with stack trace making it hard to pinpoint exact error location.

What is the expected behavior?

Is it possible to re-throw original error or, at least print it using console.error?

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