From 102f0df5184ef5fe18577f9bc912fad83c87bad2 Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Sat, 14 Feb 2026 13:52:20 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(clock-bot):=20improve=20ro?= =?UTF-8?q?om=20topic=20error=20logging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/matrix-clock-bot/src/bot/matrix.service.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/services/matrix-clock-bot/src/bot/matrix.service.ts b/services/matrix-clock-bot/src/bot/matrix.service.ts index a4fbbd9ae..960c34687 100644 --- a/services/matrix-clock-bot/src/bot/matrix.service.ts +++ b/services/matrix-clock-bot/src/bot/matrix.service.ts @@ -296,11 +296,18 @@ export class MatrixService extends BaseMatrixService implements OnModuleDestroy private async setRoomTopic(roomId: string, topic: string): Promise { try { const client = this.getClient(); + this.logger.debug(`Attempting to set room topic for ${roomId}: ${topic}`); await client.sendStateEvent(roomId, 'm.room.topic', '', { topic }); this.logger.log(`Room topic updated: ${topic}`); } catch (error: unknown) { - const errorMessage = error instanceof Error ? error.message : String(error); - this.logger.error(`Failed to set room topic for ${roomId}: ${errorMessage}`); + // Log full error details including Matrix errcode + const errorDetails = + error && typeof error === 'object' + ? JSON.stringify(error, null, 2) + : String(error); + this.logger.error( + `Failed to set room topic for ${roomId}. Topic: "${topic}". Error: ${errorDetails}` + ); } }