From 5c20a2691c55fea1d9706b0d2616846ba85e0758 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Mon, 28 Oct 2024 09:35:50 +0100 Subject: [PATCH] frontend: Displayed error in video room component --- .../video-room/video-room.component.html | 42 ++++++++++--------- .../pages/video-room/video-room.component.ts | 6 +-- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/frontend/projects/shared-call-components/src/lib/pages/video-room/video-room.component.html b/frontend/projects/shared-call-components/src/lib/pages/video-room/video-room.component.html index ac28029d..a185a5ef 100644 --- a/frontend/projects/shared-call-components/src/lib/pages/video-room/video-room.component.html +++ b/frontend/projects/shared-call-components/src/lib/pages/video-room/video-room.component.html @@ -1,23 +1,25 @@ - - +@if (!serverError) { + + +} @if (!loading && serverError) {
diff --git a/frontend/projects/shared-call-components/src/lib/pages/video-room/video-room.component.ts b/frontend/projects/shared-call-components/src/lib/pages/video-room/video-room.component.ts index fb3825e6..5c5e0fda 100644 --- a/frontend/projects/shared-call-components/src/lib/pages/video-room/video-room.component.ts +++ b/frontend/projects/shared-call-components/src/lib/pages/video-room/video-room.component.ts @@ -67,11 +67,11 @@ export class VideoRoomComponent implements OnInit { if (needToConfigureFlagsFromToken) { this.configureFetureFlagsFromTokenPermissions(); } - - this.loading = false; - } catch (error) { + } catch (error: any) { console.error('Error fetching room preferences', error); + this.serverError = error.error.message || error.message || error.error; } + this.loading = false; } async onTokenRequested(participantName: string) {