New to rxjs and angular2. How do I abort an http call and return an observable so I don't get an error on the subscription end? of course if I just return an object here, we get .searchAlbum(...).subscribe is not a function
public searchAlbum (term:string, queryObject?:any) {
if( this.abortSearches){
queryObject.body = null;
return //what to return here? used to be deferred.resolve(queryObject);
}
...
return this.http.request( new Request( options ) )
.map(res => this.extractData(res, queryObject) )
.catch(this.handleError);
}