Skip to content

Use Error objects instead of strings #85

@eliasmalik

Description

@eliasmalik

Here: https://github.com/fac-u/autocompleter/blob/master/public/request.js#L13

It's often better to use an Error object to encapsulate your error, since it will give you more structured information about what went wrong. In particular, it will give you the stack-trace.

cb(new Error('There was a problem...');

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