Catch error if project cannot be created

This commit is contained in:
grossmj 2023-11-23 16:23:15 +10:00
parent 5a46911730
commit a465133ba3
3 changed files with 7 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -120,7 +120,7 @@ export class AddAceDialogComponent implements OnInit {
this.toasterService.success(`ACE was added for path ${ACE.path}`);
},
(error) => {
this.toasterService.error(`Cannot create ACE : ${error.error.message}`)
this.toasterService.error(`Cannot create ACE: ${error.error.message}`)
})
this.dialogRef.close();
}

View File

@ -75,7 +75,12 @@ export class AddBlankProjectDialogComponent implements OnInit {
this.dialogRef.close();
this.toasterService.success(`Project ${project.name} added`);
this.router.navigate(['/controller', this.controller.id, 'project', project.project_id]);
});
},
(error) => {
this.toasterService.error("Cannot create new project");
console.log(error);
}
);
}
onKeyDown(event) {