- console.log("add microservice response :: ",this.result);
- this.passEntry.emit(this.result);
- this.ngbModal.dismissAll();
- }, error => {
- this.ngbModal.dismissAll();
- console.log(error);
- });
+ if(this.result.status === 'OK'){
+ console.log("add microservice response :: ",this.result);
+ this.passEntry.emit(this.result);
+ this.ngbModal.dismissAll();
+ }
+ else {
+ const modalErrorRef = this.ngbModal.open(ConfirmationModalComponent);
+ modalErrorRef.componentInstance.title = 'Error';
+ modalErrorRef.componentInstance.message = this.result.response;
+ }
+ });