Skip to content

Not returning before any errors #28

Description

@finnhodgkin

If you don't have return cb(err) whenever you have if statements for errors then res.end() is called twice and anything in the body is run with no data... This will break your app!

Always either return (my recommendation) before errors or make the error's if statement have an else case.

https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L23
https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L37
https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L44
https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L53

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions