From 2682489816f0f70511662f10332a70017269bc34 Mon Sep 17 00:00:00 2001 From: Austin Turner Date: Sat, 21 Dec 2024 15:56:32 -0700 Subject: [PATCH] fix error logging --- apps/cron-tasks/src/geo-ip-updater.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/cron-tasks/src/geo-ip-updater.ts b/apps/cron-tasks/src/geo-ip-updater.ts index e6da2ab8..22a957ae 100644 --- a/apps/cron-tasks/src/geo-ip-updater.ts +++ b/apps/cron-tasks/src/geo-ip-updater.ts @@ -92,7 +92,7 @@ async function importCSVToTable(csvPath: string, tableName: string, schema: stri logger.info(`Successfully imported ${csvPath} to ${fullTableName}`); } catch (error) { - logger.error(`Error importing ${csvPath}:`, error); + logger.error(getExceptionLog(error), `Error importing ${csvPath}: %s`, error.message); // Cleanup temp table if it exists await execAsync(`psql "${ENV.JETSTREAM_POSTGRES_DBURI}" -c "DROP TABLE IF EXISTS ${fullTempTableName}"`).catch(() => { // Ignore errors