- this.xappMgrSvc.deployXapp(name).subscribe(
- response => {
- switch (response.status) {
- case 200:
- this.notification.success('xApp deploy succeeded!');
- break;
- default:
- this.notification.warn('xApp deploy failed.');
+ this.appMgrService.deployXapp(app.name).subscribe(
+ (response: HttpResponse<Object>) => {
+ this.notificationService.success('App deploy succeeded!');
+ },
+ ( (her: HttpErrorResponse) => {
+ // the error field should have an ErrorTransport object
+ let msg = her.message;
+ if (her.error && her.error.message) {
+ msg = her.error.message;