How to deal with http status codes other than 200 in Angular 2
Yes you can handle with the catch operator like this and show alert as you want but firstly you have to import Rxjs for the same like this way import {Observable} from ‘rxjs/Rx’; return this.http.request(new Request(this.requestoptions)) .map((res: Response) => { if (res) { if (res.status === 201) { return [{ status: res.status, json: res }] … Read more