mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
improve logging?
This commit is contained in:
committed by
Thomas Ruoff
parent
942066bc7a
commit
00002a62d2
@@ -2,6 +2,7 @@ import { google } from 'googleapis'
|
||||
import { getBaseURL } from '../helpers/url'
|
||||
import { Booking } from '../db/booking'
|
||||
import { getDays } from '../helpers/date'
|
||||
import { log } from '../helpers/log'
|
||||
|
||||
const calendarId = process.env.GOOGLE_CALENDAR_ID
|
||||
let credentials: object
|
||||
@@ -9,7 +10,7 @@ let credentials: object
|
||||
try {
|
||||
credentials = JSON.parse(process.env.GOOGLE_SERVICE_ACCOUNT_KEY_JSON)
|
||||
} catch (error) {
|
||||
console.error(
|
||||
log.error(
|
||||
'Unable to parse process.env.GOOGLE_SERVICE_ACCOUNT_KEY_JSON - invalid JSON?'
|
||||
)
|
||||
throw error
|
||||
|
||||
Reference in New Issue
Block a user