# Http Error handeling

**URL:** <https://forum.codewithmosh.com/t/http-error-handeling/9397>\
**Category:** Angular\
**Created:** [December 23, 2021, 7:03pm UTC](https://forum.codewithmosh.com/t/http-error-handeling/9397 "2021-12-23T19:03:22Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mojeffcodes](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mojeffcodes](https://forum.codewithmosh.com/u/mojeffcodes)\
**Post date:** [February 1, 2023, 10:47pm UTC](https://forum.codewithmosh.com/t/http-error-handeling/9397/6 "2023-02-01T22:47:17Z")

</div>

Here’s another thread with working examples.

> [@Throwing Application-specific Errors .catch](https://forum.codewithmosh.com/t/throwing-application-specific-errors-catch/505/5):
>
> private handleError(error: Response) { if (error.status === 400) return throwError(new BadInput(error.json())); if (error.status === 404) return throwError(new NotFoundError()); return throwError(new AppError(error.json())); }

---

_[View the full topic](https://forum.codewithmosh.com/t/http-error-handeling/9397)._
