{"record":{"id":"308ec6abffa9372a","repo":"calcom/cal.diy","slug":"no-cal-video-reference-found-with-booking-uid-bo","errorCode":null,"errorMessage":"No Cal Video reference found with booking uid ${bookingUid}","messagePattern":"No Cal Video reference found with booking uid (.+?)","errorType":"exception","errorClass":"NotFoundException","httpStatus":404,"severity":"warning","filePath":"apps/api/v2/src/platform/bookings/2024-08-13/services/cal-video.service.ts","lineNumber":36,"sourceCode":"    private readonly calVideoOutputService: CalVideoOutputService\n  ) {}\n\n  private getVideoSessionsRoomName(references?: Array<{ type: string; meetingId?: string | null }>) {\n    return (\n      references?.filter((reference) => reference.type === CAL_VIDEO_TYPE)?.pop()?.meetingId ??\n      undefined\n    );\n  }\n\n  async getRecordings(bookingUid: string) {\n    const booking = await this.bookingsRepository.getByUidWithBookingReference(bookingUid);\n    if (!booking) {\n      throw new NotFoundException(`Booking with uid=${bookingUid} was not found in the database`);\n    }\n\n    const roomName = this.getVideoSessionsRoomName(booking.references);\n    if (!roomName) {\n      throw new NotFoundException(`No Cal Video reference found with booking uid ${bookingUid}`);\n    }\n\n    const recordings = await getRecordingsOfCalVideoByRoomName(roomName);\n\n    if (!recordings || !(\"data\" in recordings)) return [];\n\n    const recordingWithDownloadLink = recordings.data.map((recording) => {\n      return getDownloadLinkOfCalVideoByRecordingId(recording.id)\n        .then((res: { download_link: string } | undefined) => ({\n          id: recording.id,\n          roomName: recording.room_name,\n          startTs: recording.start_ts,\n          status: recording.status,\n          maxParticipants: recording.max_participants,\n          duration: recording.duration,\n          shareToken: recording.share_token,\n          downloadLink: res?.download_link,\n        }))","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/calcom/cal.diy/blob/176037d0afbe572f870a3c702985e7cd83fe6c0c/apps/api/v2/src/platform/bookings/2024-08-13/services/cal-video.service.ts#L18-L54","documentation":"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.","triggerScenarios":"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.","commonSituations":"Default event types wired to a third-party conferencing app; in-person bookings; bookings created before Cal Video was enabled.","solutions":["Inspect GET /v2/bookings/{uid}.references for a CAL_VIDEO entry before calling the recordings endpoint.","Only request recordings for bookings whose location/integration is Cal Video.","If recordings are expected, verify the booking actually used Cal Video and the daily room was created.","Handle 404 'No Cal Video reference' as a non-error in generic recording UI."],"exampleFix":"// before\nconst recs = await apiClient.get(`/v2/bookings/${uid}/recordings`);\n\n// after\nconst booking = await apiClient.get(`/v2/bookings/${uid}`).then(r => r.data);\nconst isCalVideo = (booking.references ?? []).some(r => r.type === 'cal_video');\nif (!isCalVideo) return []; // not a Cal Video meeting\nconst recs = await apiClient.get(`/v2/bookings/${uid}/recordings`);","handlingStrategy":"type-guard","validationCode":"const booking = await apiClient.get(`/v2/bookings/${uid}`).then(r => r.data);\nconst isCalVideo = (booking.references ?? []).some(r => r.type === 'cal_video' || r.type === 'integration:cal-video');\nif (!isCalVideo) { console.info(`Booking ${uid} is not a Cal Video meeting`); return []; }","typeGuard":"function isCalVideoBooking(booking: { references?: Array<{ type: string }> }): boolean {\n  return (booking.references ?? []).some(r => r.type === 'cal_video' || r.type === 'integration:cal-video');\n}","tryCatchPattern":"try {\n  return await apiClient.get(`/v2/bookings/${uid}/recordings`).then(r => r.data);\n} catch (err) {\n  if (err.response?.status === 404 && /No Cal Video reference/i.test(err.response?.data?.message ?? '')) return [];\n  throw err;\n}","preventionTips":["Only request recordings for Cal Video meetings (check references.type).","Render 'recordings unavailable' for non-Cal-Video bookings instead of erroring.","Confirm the event type's default location is Cal Video when recordings are expected."],"tags":["cal-video","integrations","recordings","api-v2","not-found"],"backgroundTag":null,"analyzedSha":"176037d0afbe572f870a3c702985e7cd83fe6c0c","analyzedAt":"2026-08-12T19:12:41.464Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}