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
if (response.success == 0) { throw Observable.throw(response); }
Edit for rxjs 6:
if (response.success == 0) { throw throwError(response); }