Skip to content

Commit

Permalink
fix, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
21e8 committed Dec 9, 2024
1 parent 23ab0a4 commit 8092993
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/batcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions src/processors/telegram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8092993

Please sign in to comment.