I have this code in client.add.component.ts and want to do error handling for Duplicate entry. I get 503 error in console currently.
this.clientsSvc.createClient(client).subscribe(x => this.router.navigate(['../'], {relativeTo: this.route}));
How to add the following line to the above code?
this.snackBar.open(`Duplicate Client Name`, null, {duration: 3000});