fix(#227): remove hardcoded unknown-error fallback in host/player flow
All checks were successful
CI / test-and-quality (push) Successful in 3m12s
CI / test-and-quality (pull_request) Successful in 3m14s

This commit is contained in:
2026-03-01 23:42:47 +00:00
parent 187b26e561
commit 1b899a30a2
2 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;