Skip to content

Handle all errors with more than just a console.log #42

Description

@finnhodgkin
if (error) {
        console.log('error checking username', err);
      }

In a handler the above code will just mean that the user never gets a response from the server. Make sure every route through your application ends with a response.end();!

Preferably also give the user nice error messages that explain what went wrong. Leaving console.logs in for yourself so you know how the server is breaking isn't always a bad idea, but it should be secondary to actually serving errors to your users.

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

    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