---
title: "Discussion on \"How to handle errors in Express and Node.js App\" | Hashnode"
description: "Discussion on \"How to handle errors in Express and Node.js App\". Image by mohamed Hassan from Pixabay\nWhen we create api's with express, we define some routes and their handlers, in an ideal world, consumers of our api will only make requests to routes that we defined and our routes will work without error. But if..."
url: "https://hashnode.com/posts/how-to-handle-errors-in-express-and-nodejs-app/5e18ea0832d5fad159b6747c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to handle errors in Express and Node.js App](https://samolusola.me/how-to-handle-errors-in-express-and-nodejs-app?utm_source=hashnode&utm_medium=feed)

Image by mohamed Hassan from Pixabay When we create api's with express, we define some routes and their handlers, in an ideal world, consumers of our api will only make requests to routes that we defined and our routes will work without error. But if...

Jan 10, 2020 · samolusola.me  
Updated Jan 13, 2020  
Read the article

## Written by

[Samuel Olusola](https://hashnode.com/@samolusola)

@samolusola · Lagos, Nigeria

  
[View profile](https://hashnode.com/@samolusola)

Software Engineer (TypeScript/Node/Go/Rust)

Software Engineer from Lagos, Nigeria. Studies Computer Science at the University of Lagos, Nigeria (in his finals). Teaches on youtube too at youtube.com/@samolusola

## Responses 1

Markdown supported · ⌘↵ to post

[nokha](https://hashnode.com/@nokhatriprasa)

[Apr 4, 2021](https://hashnode.com/posts/how-to-handle-errors-in-express-and-nodejs-app/5e18ea0832d5fad159b6747c/comment/6069996fb17dc439b747b286)

**Thanks a lot!** This is such a wonderfully written post. I was finding difficulty in understanding the error handling in expressjs however going through your post has helped me a lot.

[Samuel Olusola](https://hashnode.com/@samolusola)

[Apr 4, 2021](https://hashnode.com/posts/how-to-handle-errors-in-express-and-nodejs-app/5e18ea0832d5fad159b6747c/comment/6069996fb17dc439b747b286#reply-6069c5761ed1783ab0634428)

Thanks for the kind words. I'm happy my post was able to help you🤸🤸
