# Catching Errors with rxjs not working as shown

**URL:** https://forum.codewithmosh.com/t/catching-errors-with-rxjs-not-working-as-shown/5648
**Category:** Angular
**Created:** [June 22, 2021, 6:27am UTC](https://forum.codewithmosh.com/t/catching-errors-with-rxjs-not-working-as-shown/5648 "2021-06-22T06:27:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jordankittle](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jordankittle](https://forum.codewithmosh.com/u/jordankittle)
#### Post date: [June 22, 2021, 6:27am UTC](https://forum.codewithmosh.com/t/catching-errors-with-rxjs-not-working-as-shown/5648/1 "2021-06-22T06:27:34Z")

</div>

I am trying to follow along with courses/206545/lectures/3196489 but the error handling with rxjs must have changed. I cannot find .catch available even after importing ‘rxjs/add/operator/catch’

Also, in courses/angular-master-class/lectures/3196486 when I change the post id to 3456, I am still getting a response of OK from jsonplaceholder API.

---

<div class="post-metadata">

### Author: ![Anastasia\_djk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/anastasia_djk/32/3270_2.png) [@Anastasia\_djk](https://forum.codewithmosh.com/u/Anastasia_djk)
#### Post date: [December 15, 2021, 1:18pm UTC](https://forum.codewithmosh.com/t/catching-errors-with-rxjs-not-working-as-shown/5648/2 "2021-12-15T13:18:05Z")

</div>

Hey there,  
Have you managed to solve the problem?

---

<div class="post-metadata">

### Author: ![pesz](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@pesz](https://forum.codewithmosh.com/u/pesz)
#### Post date: [November 8, 2023, 10:33am UTC](https://forum.codewithmosh.com/t/catching-errors-with-rxjs-not-working-as-shown/5648/3 "2023-11-08T10:33:03Z")

</div>

This post is pretty useful:

> [@Throwing Application-specific Errors .catch](https://forum.codewithmosh.com/t/throwing-application-specific-errors-catch/505/7):
>
> throwError method signature taking an error value is being removed in version 8. I’m currently on rxjs version 7.5.7. Angular 15. Also be sure you import your custom NotFoundError class, rather than from rxjs (same thing in the component), which auto import will do. Below is the implementation I used: import { Observable, throwError } from 'rxjs'; import { catchError } from 'rxjs/operators'; import { AppError } from '../common/app-error'; import { NotFoundError } from …
