Skip to content

is.error() does not recognise sub-classes of Error as errors #301

Open
@bbusschots-mu

Description

@bbusschots-mu

I have custom error classes in my code that are properly sub-classed from Error using the very convenient es6-error NPM module. Errors generated with these sub-classes are recognised as instances of Error by JavaScript, i.e. myError instanceof Error evaluates to true. However, is.error() evaluates to false. Surely anything that gets true for instanceof Error should be recognised as an error by is.error()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions