Control of error in nested Observables methods

Hi, this isn’t about Ionic itself but I’d like to know if anyone of you know how to do this.

Imagine I have 3 methods: B, C and D in which each return an observable and 1 method A which starts the chain. So, method A, calls method B which calls method C which calls method D.

If any of the methods B, C or D throw an exception, I want to control it in method A.

Hod could I achieve this?


1 Like

Have you seen the catchError operator?

1 Like

Tried that but didn’t work. However, I found this which works perfectly