I am working on an Angular app in which I am making a rest call through HTTP as below:
login(email, password) { let headers = new Headers(); headers.a
rxjs 6
import { throwError } from 'rxjs'; if (response.success == 0) { return throwError(response); }
rxjs 5
import { ErrorObservable } from 'rxjs/observable/ErrorObservable'; if (response.success == 0) { return new ErrorObservable(response); }
What you return with ErrorObservable is up to you
ErrorObservable