Skip to content

Simpler error handling in queries #61

@tbtommyb

Description

@tbtommyb

Correct me if I'm wrong, but I don't think you need the if / else control flow here. You can just call handlerCallback(err, res).

If there is an error the rest of your code should check for it first and ignore the res (which will be null or empty anyway) and if there's no error it'll be null anyway so you can just pass both variables straight through.

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