Fix/google calendar false alert (#3636)

This commit is contained in:
alannnc authored and GitHub committed 2022-08-02 18:07:45 +00:00
1 parent 7480a73905
commit e767d233ad
3 files changed
+34 -27

No files matched your search

+10 -3
View File
@@ -160,10 +160,17 @@ export const createEvent = async (
// TODO: Surfice success/error messages coming from apps to improve end user visibility
const creationResult = calendar
? await calendar.createEvent(calEvent).catch(async (e) => {
await sendBrokenIntegrationEmail(calEvent, "calendar");
log.error("createEvent failed", e, calEvent);
? await calendar.createEvent(calEvent).catch(async (error) => {
success = false;
/**
* There is a time when selectedCalendar externalId doesn't match witch certain credential
* so google returns 404.
* */
if (error?.code === 404) {
return undefined;
}
await sendBrokenIntegrationEmail(calEvent, "calendar");
log.error("createEvent failed", error, calEvent);
return undefined;
})
: undefined;
+2 -2
View File
@@ -141,8 +141,8 @@ export default class EventManager {
const referencesToCreate = results.map((result) => {
return {
type: result.type,
uid: result.createdEvent?.id.toString() ?? "",
meetingId: result.createdEvent?.id.toString(),
uid: result.createdEvent?.id?.toString() ?? "",
meetingId: result.createdEvent?.id?.toString(),
meetingPassword: result.createdEvent?.password,
meetingUrl: result.createdEvent?.url,
externalCalendarId: evt.destinationCalendar?.externalId,