diff --git a/frontend/angular/src/app/features/host/host-shell.component.ts b/frontend/angular/src/app/features/host/host-shell.component.ts index 59087b0..4253051 100644 --- a/frontend/angular/src/app/features/host/host-shell.component.ts +++ b/frontend/angular/src/app/features/host/host-shell.component.ts @@ -156,7 +156,7 @@ export class HostShellComponent implements OnInit, OnDestroy { try { const state = await this.controller.hydrateLobby(this.sessionCode); if (!state.session || state.errorMessage) { - throw new Error(state.errorMessage ?? 'Unknown error'); + throw new Error(state.errorMessage ?? this.copy('common.unknown_error')); } this.session = state.session as SessionDetail; this.sessionCode = this.session.session.code; @@ -177,7 +177,7 @@ export class HostShellComponent implements OnInit, OnDestroy { await this.runAction(async () => { const state = await this.controller.startRound(this.sessionCode, this.categorySlug.trim()); if (!state.session || state.errorMessage) { - throw new Error(state.errorMessage ?? 'Unknown error'); + throw new Error(state.errorMessage ?? this.copy('common.unknown_error')); } this.session = state.session as SessionDetail; this.sessionCode = this.session.session.code; diff --git a/frontend/angular/src/app/features/player/player-shell.component.ts b/frontend/angular/src/app/features/player/player-shell.component.ts index 2bbc9f4..aa5fdcb 100644 --- a/frontend/angular/src/app/features/player/player-shell.component.ts +++ b/frontend/angular/src/app/features/player/player-shell.component.ts @@ -433,7 +433,7 @@ export class PlayerShellComponent implements OnInit, OnDestroy { try { const state = await this.controller.hydrateLobby(this.sessionCode); if (!state.session || state.errorMessage) { - throw new Error(state.errorMessage ?? 'Unknown error'); + throw new Error(state.errorMessage ?? this.copy('common.unknown_error')); } this.session = state.session as SessionDetail; this.sessionCode = this.session.session.code; @@ -459,7 +459,7 @@ export class PlayerShellComponent implements OnInit, OnDestroy { try { const state = await this.controller.joinLobby(this.sessionCode, this.nickname); if (!state.session || state.errorMessage) { - throw new Error(state.errorMessage ?? 'Unknown error'); + throw new Error(state.errorMessage ?? this.copy('common.unknown_error')); } this.session = state.session as SessionDetail; this.sessionCode = this.session.session.code;