---
title: "Discussion on \"Handling errors in TypeScript the right way\" | Hashnode"
description: "Discussion on \"Handling errors in TypeScript the right way\". Error handling is one of the key areas in software engineering. When done correctly, it can save you hours of debugging and troubleshooting. I’ve identified three main challenges related to error handling:\n\nTypeScript’s error type\n\nVariable scoping\n\n..."
url: "https://hashnode.com/posts/handling-errors-in-typescript-the-right-way/64f7392999089360980e561d"
---

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

Discussion

# [Handling errors in TypeScript the right way](https://nbouvrette.hashnode.dev/handling-errors-in-typescript-the-right-way?utm_source=hashnode&utm_medium=feed)

Error handling is one of the key areas in software engineering. When done correctly, it can save you hours of debugging and troubleshooting. I’ve identified three main challenges related to error handling: TypeScript’s error type Variable scoping ...

Sep 5, 2023 · 17 min read · nbouvrette.hashnode.dev  
Updated Sep 7, 2023  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#coding](https://hashnode.com/tag/coding)
-   [#code-quality](https://hashnode.com/tag/code-quality)
-   [#error-handling](https://hashnode.com/tag/error-handling)
-   [#errors-in-javascript](https://hashnode.com/tag/errors-in-javascript)

## Written by

[Nicolas Bouvrette](https://hashnode.com/@nbouvrette)

@nbouvrette

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

Seasoned technology leader with a deep-rooted passion for software engineering, backed by over two decades of multifaceted experience.

Seasoned technology leader with a deep-rooted passion for software engineering, backed by over two decades of multifaceted experience. As CTO and Co-Founder at Avansai, I drove product development while wearing multiple hats, from road mapping to business strategy. At Expedia, I led software engineering teams on pivotal projects, including the ground-breaking i18n platform, while also spearheading the evolution from traditional to automated deployment systems. Before joining Expedia, I was managing nationwide tech operations, from data centers to telecom infrastructures. While my heart lies in software, my expertise spans a broad spectrum of technological domains.

## Responses 2

Markdown supported · ⌘↵ to post

[Mustakim Khatik](https://hashnode.com/@MustkimKhatik)

[Sep 6, 2023](https://hashnode.com/posts/handling-errors-in-typescript-the-right-way/64f7392999089360980e561d/comment/64f80360c035cd988c321759)

Really helpful info! Keep it up!

[Nicolas Bouvrette](https://hashnode.com/@nbouvrette)

[Sep 6, 2023](https://hashnode.com/posts/handling-errors-in-typescript-the-right-way/64f7392999089360980e561d/comment/64f80360c035cd988c321759#reply-64f80428c035cd988c321778)

Thank you!

[Marc-Antoine Dubé](https://hashnode.com/@mdube)

[Sep 5, 2023](https://hashnode.com/posts/handling-errors-in-typescript-the-right-way/64f7392999089360980e561d/comment/64f73b8bb618cf98bcc51d72)

Wow, that's another great article. Impressed by how you taught to improve wrappers in TypeScript, I didn't expect that I would relearn how to handle errors properly!

[Nicolas Bouvrette](https://hashnode.com/@nbouvrette)

[Sep 5, 2023](https://hashnode.com/posts/handling-errors-in-typescript-the-right-way/64f7392999089360980e561d/comment/64f73b8bb618cf98bcc51d72#reply-64f73d7ab618cf98bcc51db8)

Thanks, I'm happy this could help!
