fix(clock-bot): improve room topic error logging

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2026-02-14 13:47:15 +01:00
parent 5ef04eabb2
commit ba818ef256

View file

@ -297,8 +297,10 @@ export class MatrixService extends BaseMatrixService implements OnModuleDestroy
try {
const client = this.getClient();
await client.sendStateEvent(roomId, 'm.room.topic', '', { topic });
} catch (error) {
this.logger.warn(`Failed to set room topic for ${roomId}: ${error}`);
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}`);
}
}