Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
reportError(message, apiErrorObjs?) {
let calendar = this.calendar
let calendarOnError = calendar.opt('googleCalendarError')
let errorObjs = apiErrorObjs || [ { message: message } ] // to be passed into error handlers
if (this.googleCalendarError) {
this.googleCalendarError.apply(calendar, errorObjs)
}
if (calendarOnError) {
calendarOnError.apply(calendar, errorObjs)
}
// print error to debug console
warn.apply(null, [ message ].concat(apiErrorObjs || []))
}