Integrate EPSDK-FW library for auth and users
[portal/ric-dashboard.git] / webapp-frontend / src / app / ran-control / ran-connection-dialog.component.ts
index 25442f7..7c63f13 100644 (file)
@@ -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
             })
         );