calcom/cal.diy · error · NotFoundException
Failed to update meeting
Error message
Failed to update meeting
What it means
GoogleCalendarService.updateEventDetails throws NotFoundException('Failed to update meeting') when calendar.events.patch resolves but returns no event.data. The PATCH succeeded at the transport level but yielded an empty body, treated by the service as a failed update.
Source
Thrown at apps/api/v2/src/modules/cal-unified-calendars/services/google-calendar.service.ts:95
const ownerUserEmail = bookingReference?.booking?.user?.email;
const calendar = await this.getAuthorizedCalendarInstance(
ownerUserEmail,
bookingReference.credential?.key,
bookingReference.delegationCredential
);
const updatePayload = new GoogleCalendarEventInputPipe().transform(updateData);
try {
const event = await calendar.events.patch({
calendarId: bookingReference?.externalCalendarId ?? "primary",
eventId: bookingReference?.uid,
requestBody: updatePayload,
});
if (!event.data) {
throw new NotFoundException("Failed to update meeting");
}
return event.data as GoogleCalendarEventResponse;
} catch (error) {
throw new NotFoundException("Failed to update meeting details");
}
}
/**
* Gets an authorized Google Calendar instance
* Tries delegation credentials first, falls back to direct OAuth
*/
private async getAuthorizedCalendarInstance(
userEmail?: string,
oAuthCredentials?: Prisma.JsonValue | undefined,
delegationCredential?: { id: string } | null
): Promise<calendar_v3.Calendar> {
if (userEmail && delegationCredential?.id) {
const delegatedCalendar = await this.getDelegatedCalendarInstance(delegationCredential, userEmail);View on GitHub (pinned to 176037d0af)
Solutions
- Re-fetch the event to confirm it still exists before patching (optimistic-concurrency).
- Retry once; if it persists, surface to the user that the meeting is no longer available.
- Verify externalCalendarId/uid on the reference are still valid against the live calendar.
Defensive patterns
Strategy: retry
Validate before calling
// Re-check existence right before patching to avoid the empty-response branch
const stillExists = await calendar.events.get({ calendarId, eventId }).then(r => !!r.data).catch(() => false);
if (!stillExists) throw new Error('Meeting vanished before update; aborting'); Try / catch
try {
return await api.v2.calUnified.updateEvent(eventUid, patch);
} catch (err) {
if (err?.statusCode === 404 && /Failed to update meeting$/i.test(err?.message)) {
// one retry after re-verifying the event exists
}
throw err;
} Prevention
- Re-fetch the event immediately before patching to reduce the deletion race window.
- Keep externalCalendarId and uid on the reference in sync with the live calendar.
- Treat persistent empty responses as 'event gone' rather than retrying indefinitely.
When it happens
Trigger: A patch against an event id that Google silently does not return (event deleted between the get and patch, or patched against a calendar where the event no longer exists).
Common situations: Race: the event was deleted in Google between the booking-reference lookup and the patch; calendar recreated; partial Google outage returning empty bodies.
Related errors
- Failed to update meeting details
- Booking reference not found
- Meeting not found
- Failed to retrieve meeting details
- Booking with uid ${bookingUid} not found
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/52c0a6a60d672cf2.
Report an issue: GitHub.