Skip to content

Don't use error.constructor.name to identify errors #44

@gmaclennan

Description

@gmaclennan

Minifying code can result in constructor.name changing (because a minifier can change function and class names), so it's not a reliable way to identify errors. Instead we should identify NotFound errors by adding an Error.code value in @comapeo/core and check the error type based on that.

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