I am using observables and the rxJS library .
I create my observable as follows:
this.validate$ = new Observable(observer =>
this.validateObserver = observer).share();
I then push objects onto this as follows:
this.validateObserver.next(responseJson);
If there is an error in what i am fetching, i pass on the error as follows:
this.validateObserver.error(this.setErrorMessage(filter));
I subscribe to this as follows, from a different class :
this.uploader.validate$.subscribe(
result => {
console.log('result triggered');
},
error => {
console.log('error triggered');
}
However i want my subscriber to keep listening after it receives and error instead of terminating listening as it does currently.
Can someone help with how I would be able to resume after processing the error ?