Skip to content

Commit f4043a9

Browse files
committed
fix(whatsapp-cache): improve error logging in save function
Updated the error handling in the saveOnWhatsappCache function to log the error message separately, improving clarity on issues encountered during item processing.
1 parent 139ad9b commit f4043a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/onWhatsappCache.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ export async function saveOnWhatsappCache(data: ISaveOnWhatsappCacheParams[]) {
170170
}
171171
} catch (e) {
172172
// Loga o erro mas não para a execução dos outros promises
173-
logger.error(`[saveOnWhatsappCache] Error processing item for ${item.remoteJid}: `, e);
173+
logger.error(`[saveOnWhatsappCache] Error processing item for ${item.remoteJid}: `);
174+
logger.error(e);
174175
}
175176
});
176177

0 commit comments

Comments
 (0)