I have an observable, does an http get in the middle of processing other 
observables.
In the case of the http get response code of anything but 200, I want to 
take note of this error but proceed to the next observable.

So far I have this:

this.getConfigurationSettings()
    .do(config => {
        console.log('configuration settings.: ', config);
        this.configSettings = config;
        this.subscriptionService.setWSAddressProvider('badUrl');
    })
    .switchMap(config => this.askForWSData())
    .do(config =>
        console.log('askForWSData' + config))
    .switchMap(r => this.processWSData())
    .subscribe(
        config => {
            console.log('start of data processing: ' + config);
        },
        err => {
            // Log errors if any
            console.log(err);
        },
        () => console.log('app exiting'));


and the observable that can return an http error code is the following:



setWSAddressProvider() : Observable<string[]> {
    return this.http.get(*'badUrl'*)
        .map((res:Response) => {
            this.address = res.text();
            return [res.text()];
        });
        // .catch((error:any) =>
        // Observable.throw('Server error')
        // );
}


the above case generate a 400 response code. I want to log that return but go 
on to other observables.

How to do that?

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to