Skip to content

Instantly share code, notes, and snippets.

View chandanch's full-sized avatar
📘
Design, Build, Transform, Graph, Nxt Gen Solutions 😀

Chandan CH chandanch

📘
Design, Build, Transform, Graph, Nxt Gen Solutions 😀
View GitHub Profile
@chandanch
chandanch / API.md
Last active July 13, 2021 10:18 — forked from iros/API.md
Documenting your REST API

Show User

Returns json data about a single user.

  • URL

    /users/:id

  • Method:

Handling Errors

Express.js makes it a breeze to handle errors in your routes.

Express lets you centralizes your error-handling through middleware.

Let's look at patterns for how to get the most out of your error-handling.

First, our error-handling middleware looks like this: