From 9e223c5dcf57e7caa9ecd463333e71b040df1779 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Mon, 26 Oct 2026 17:32:04 -0400 Subject: [PATCH] An error while the drake moves after the answer is logged, not thrown into the void Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01CCLa2PaEeCj8njQZSWGqHx --- server/src/rooms.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/src/rooms.ts b/server/src/rooms.ts index 7d4da53..3a6eca5 100644 --- a/server/src/rooms.ts +++ b/server/src/rooms.ts @@ -365,8 +365,13 @@ export class Rooms { setImmediate(() => { // A room forgotten and loaded again drives itself; this one is no longer the table. if (this.rooms.get(room.id) !== room) return; - this.driveBots(room); - this.botsSpeak(room, 'phase'); + try { + this.driveBots(room); + this.botsSpeak(room, 'phase'); + } catch (e) { + // Nothing is waiting on this callback: an error here would take the process down, so it is logged and the table left as it stands. + console.error(`${room.id}: the bots could not move: ${e instanceof Error ? e.stack ?? e.message : String(e)}`); + } }); }