X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=webapp-frontend%2Fsrc%2Fapp%2Fran-control%2Fran-connection-dialog.component.ts;h=7c63f13297236e2095ef72ea0f6f9225e788a83b;hb=3f812ea25d352ec33d07f5ffa4c2aa2a77e8e793;hp=25442f7761cbd5f4d7b6104400dc1416b574e4d2;hpb=fa50e55b6e8977ad0a6a28096fe58fb54924ca2b;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.ts b/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.ts index 25442f77..7c63f132 100644 --- a/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.ts +++ b/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.ts @@ -86,9 +86,14 @@ export class RanControlConnectDialogComponent implements OnInit { this.notifService.success('Connect succeeded!'); this.dialogRef.close(true); }, - ( (error: HttpErrorResponse) => { + ( (her: HttpErrorResponse) => { this.processing = false; - this.errorService.displayError('RAN Connection Failed: ' + error.message); + // the error field carries the server's response + let msg = her.message; + if (her.error && her.error.message) { + msg = her.error.message; + } + this.errorService.displayError('Connect failed: ' + msg); // keep the dialog open }) );