From 809299346e5dd47c66ef29cdce294003ea3bb386 Mon Sep 17 00:00:00 2001 From: 21e8 Date: Mon, 9 Dec 2024 20:56:16 +0100 Subject: [PATCH] fix, bump version --- package.json | 2 +- src/batcher.ts | 3 ++- src/processors/telegram.ts | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d0fff61..759dc63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alice-whispers", - "version": "0.2.23", + "version": "0.2.24", "description": "Intelligent message batching system that whispers your messages in perfect harmony, with smart batching and error classification", "type": "module", "main": "./dist/cjs/index.js", diff --git a/src/batcher.ts b/src/batcher.ts index d3e40ff..c1d41dd 100644 --- a/src/batcher.ts +++ b/src/batcher.ts @@ -82,7 +82,8 @@ export function createMessageBatcher(config: BatcherConfig): MessageBatcher { queueMessage(message, 'warning'); } - function error(message: string, error?: Error | string): void { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + function error(message: string, error?: Error | any): void { queueMessage(message, 'error', error); } diff --git a/src/processors/telegram.ts b/src/processors/telegram.ts index e54cf96..9071ec1 100644 --- a/src/processors/telegram.ts +++ b/src/processors/telegram.ts @@ -54,14 +54,14 @@ export function createTelegramProcessor( if (!response.ok) { const error = await response.json(); - console.log('[Telegram] API Response:', error); + console.error('[Telegram] API Response:', error); throw new Error( - `Failed to send Telegram message: ${response.status} ${response.statusText}\nundefined` + `Failed to send Telegram message: ${response.status} ${response.statusText}\n${(error as any).description}` ); } } catch (error) { if (error instanceof Error) { - console.log('[Telegram] API Response:', { + console.error('[Telegram] API Response:', { ok: false, error_code: 400, description: error.message,