Skip to content

Commit a823569

Browse files
committed
fix logging on errors
1 parent 0bbf58e commit a823569

File tree

1 file changed

+2
-2
lines changed
  • services/apps/script_executor_worker/src/activities/copy-activities-from-questdb-to-tinybird

1 file changed

+2
-2
lines changed

services/apps/script_executor_worker/src/activities/copy-activities-from-questdb-to-tinybird/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ export async function sendActivitiesToTinybird(activitiesRedisKey: string): Prom
7575
console.log(`Data sent to tinybird -> ${JSON.stringify(response)}`)
7676
} catch (err) {
7777
if (axios.isAxiosError(err)) {
78-
this.log.warn(
78+
svc.log.warn(
7979
`Axios error occurred while sending activities to tinybird. ${err.response?.status} - ${err.response?.statusText}`,
8080
)
8181
throw new Error(`Sending data to tinybird failed with status: ${err.response?.status}`)
8282
} else {
83-
this.log.error(`Unexpected error while sending data to tinybird: ${err}`)
83+
svc.log.error(`Unexpected error while sending data to tinybird: ${err}`)
8484
throw new Error('An unexpected error occurred')
8585
}
8686
}

0 commit comments

Comments
 (0)