calcom/cal.diy · error · NotFoundException
Failed to retrieve meeting details
Error message
Failed to retrieve meeting details
What it means
GoogleCalendarService.getEventDetails wraps the calendar.events.get call in try/catch and rethrows as NotFoundException('Failed to retrieve meeting details'). Any thrown error from the Google API (auth, network, 404 from Google, quota) is flattened into this single message.
Solutions
- Inspect the underlying error (log it before rethrowing) — without it the cause is hidden; the current catch swallows detail.
- Re-authenticate the Google Calendar connection if the credential is invalid.
- Retry with backoff for transient 5xx/rate-limit errors from Google.
- Improve the catch to map Google status codes (403 vs 404 vs 5xx) to distinct responses.
Example fix
// before
} catch (error) {
throw new NotFoundException("Failed to retrieve meeting details");
}
// after
} catch (error) {
this.logger.error({ message: 'gcal events.get failed', eventId, error });
const status = error?.code ?? error?.response?.status;
if (status === 401 || status === 403) throw new UnauthorizedException('Google Calendar access denied');
if (status === 404) throw new NotFoundException('Meeting not found in Google Calendar');
throw new BadGatewayException('Failed to retrieve meeting details from Google');
} Defensive patterns
Strategy: try-catch
Try / catch
try {
return await api.v2.calUnified.getEvent(eventUid);
} catch (err) {
// service currently collapses all Google errors into 'Failed to retrieve meeting details'
if (err?.statusCode === 404) {
// could be missing event OR upstream Google failure; surface to the user and stop retrying
throw new Error('Could not retrieve the meeting; verify Google Calendar access and try again.');
}
throw err;
} Prevention
- Patch the service to log and rethrow distinct errors per Google status code.
- Re-authenticate the Google connection proactively when its refresh token nears expiry.
- Respect Google quota/rate-limit headers and back off.
When it happens
Trigger: The Google Calendar API itself throws while fetching the event: expired/revoked OAuth token for the calendar, insufficient scopes, 403 rate limit, 404 from Google, or a transient network error.
Common situations: The connected Google account's refresh token expired (re-auth needed); the integration's OAuth credentials lack calendar.events scope; hitting Google API quota; transient 5xx from Google.
Related errors
- Failed to update meeting details
- Booking reference not found
- Failed to update meeting
- Meeting not found
- Booking with uid has no event type
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/29e3b27b7c18d0ca.
Report an issue: GitHub.
Appendix: source
Thrown at apps/api/v2/src/modules/cal-unified-calendars/services/google-calendar.service.ts:62
const calendar = await this.getAuthorizedCalendarInstance(
ownerUserEmail,
bookingReference.credential?.key,
bookingReference.delegationCredential
);
try {
const event = await calendar.events.get({
calendarId: bookingReference?.externalCalendarId ?? "primary",
eventId: bookingReference?.uid,
// fields: "id,status,created,updated,summary,description,location,creator,organizer,start,end,attendees,conferenceData"
});
if (!event.data) {
throw new NotFoundException("Meeting not found");
}
return event.data as GoogleCalendarEventResponse;
} catch (error) {
throw new NotFoundException("Failed to retrieve meeting details");
}
}
async updateEventDetails(
eventUid: string,
updateData: UpdateUnifiedCalendarEventInput
): Promise<GoogleCalendarEventResponse> {
const bookingReference =
await this.bookingReferencesRepository.getBookingReferencesIncludeSensitiveCredentials(eventUid);
if (!bookingReference) {
throw new NotFoundException("Booking reference not found");
}
const ownerUserEmail = bookingReference?.booking?.user?.email;
const calendar = await this.getAuthorizedCalendarInstance(
ownerUserEmail,View on GitHub (pinned to 176037d0af)