calcom/cal.diy · warning · NotFoundException

No Cal Video reference found with booking uid ${bookingUid}

Error message

No Cal Video reference found with booking uid ${bookingUid}

What it means

Thrown by getRecordings when the booking exists but has no reference of type CAL_VIDEO_TYPE (the helper getVideoSessionsRoomName returns undefined). NestJS NotFoundException (HTTP 404). The booking did not use the Cal Video integration (e.g., it used Zoom/Google Meet, or had no video location), so there is no room name to query recordings for.

Source

Thrown at apps/api/v2/src/platform/bookings/2024-08-13/services/cal-video.service.ts:36

    private readonly calVideoOutputService: CalVideoOutputService
  ) {}

  private getVideoSessionsRoomName(references?: Array<{ type: string; meetingId?: string | null }>) {
    return (
      references?.filter((reference) => reference.type === CAL_VIDEO_TYPE)?.pop()?.meetingId ??
      undefined
    );
  }

  async getRecordings(bookingUid: string) {
    const booking = await this.bookingsRepository.getByUidWithBookingReference(bookingUid);
    if (!booking) {
      throw new NotFoundException(`Booking with uid=${bookingUid} was not found in the database`);
    }

    const roomName = this.getVideoSessionsRoomName(booking.references);
    if (!roomName) {
      throw new NotFoundException(`No Cal Video reference found with booking uid ${bookingUid}`);
    }

    const recordings = await getRecordingsOfCalVideoByRoomName(roomName);

    if (!recordings || !("data" in recordings)) return [];

    const recordingWithDownloadLink = recordings.data.map((recording) => {
      return getDownloadLinkOfCalVideoByRecordingId(recording.id)
        .then((res: { download_link: string } | undefined) => ({
          id: recording.id,
          roomName: recording.room_name,
          startTs: recording.start_ts,
          status: recording.status,
          maxParticipants: recording.max_participants,
          duration: recording.duration,
          shareToken: recording.share_token,
          downloadLink: res?.download_link,
        }))

View on GitHub (pinned to 176037d0af)

Solutions

  1. Inspect GET /v2/bookings/{uid}.references for a CAL_VIDEO entry before calling the recordings endpoint.
  2. Only request recordings for bookings whose location/integration is Cal Video.
  3. If recordings are expected, verify the booking actually used Cal Video and the daily room was created.
  4. Handle 404 'No Cal Video reference' as a non-error in generic recording UI.

Example fix

// before
const recs = await apiClient.get(`/v2/bookings/${uid}/recordings`);

// after
const booking = await apiClient.get(`/v2/bookings/${uid}`).then(r => r.data);
const isCalVideo = (booking.references ?? []).some(r => r.type === 'cal_video');
if (!isCalVideo) return []; // not a Cal Video meeting
const recs = await apiClient.get(`/v2/bookings/${uid}/recordings`);
Defensive patterns

Strategy: type-guard

Validate before calling

const booking = await apiClient.get(`/v2/bookings/${uid}`).then(r => r.data);
const isCalVideo = (booking.references ?? []).some(r => r.type === 'cal_video' || r.type === 'integration:cal-video');
if (!isCalVideo) { console.info(`Booking ${uid} is not a Cal Video meeting`); return []; }

Type guard

function isCalVideoBooking(booking: { references?: Array<{ type: string }> }): boolean {
  return (booking.references ?? []).some(r => r.type === 'cal_video' || r.type === 'integration:cal-video');
}

Try / catch

try {
  return await apiClient.get(`/v2/bookings/${uid}/recordings`).then(r => r.data);
} catch (err) {
  if (err.response?.status === 404 && /No Cal Video reference/i.test(err.response?.data?.message ?? '')) return [];
  throw err;
}

Prevention

When it happens

Trigger: GET recordings on a booking whose video integration is not Cal Video (Zoom, Meet, Teams); a booking with no video location at all; a booking whose Cal Video reference was never written.

Common situations: Default event types wired to a third-party conferencing app; in-person bookings; bookings created before Cal Video was enabled.

Related errors


AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12). Data as JSON: /api/errors/308ec6abffa9372a. Report an issue: GitHub.