From 1b899a30a2ada3873e8dae12a27a64c668b4204a Mon Sep 17 00:00:00 2001 From: Asger Geel Weirsoee Date: Sun, 1 Mar 2026 23:42:47 +0000 Subject: [PATCH] fix(#227): remove hardcoded unknown-error fallback in host/player flow --- .../angular/src/app/features/host/host-shell.component.ts | 4 ++-- .../angular/src/app/features/player/player-shell.component.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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;