{"record":{"id":"acb80704e3870d74","repo":"calcom/cal.diy","slug":"booking-with-bookinguid-bookinguid-is-not-part","errorCode":null,"errorMessage":"Booking with bookingUid=${bookingUid} is not part of a recurring booking.","messagePattern":"Booking with bookingUid=(.+?) is not part of a recurring booking\\.","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"apps/api/v2/src/platform/bookings/2024-08-13/services/bookings.service.ts","lineNumber":938,"sourceCode":"      arePlatformEmailsEnabled: bookingRequest.arePlatformEmailsEnabled,\n      platformClientId: bookingRequest.platformClientId,\n      platformCancelUrl: bookingRequest.platformCancelUrl,\n      platformRescheduleUrl: bookingRequest.platformRescheduleUrl,\n      platformBookingUrl: bookingRequest.platformBookingUrl,\n    });\n\n    if (\"cancelSubsequentBookings\" in body && body.cancelSubsequentBookings) {\n      return this.getAllRecurringBookingsByIndividualUid(bookingUid, authUser);\n    }\n\n    return this.getBooking(bookingUid, authUser);\n  }\n\n  private async getAllRecurringBookingsByIndividualUid(bookingUid: string, authUser: AuthOptionalUser) {\n    const booking = await this.bookingsRepository.getByUid(bookingUid);\n    const recurringBookingUid = booking?.recurringEventId;\n    if (!recurringBookingUid) {\n      throw new BadRequestException(\n        `Booking with bookingUid=${bookingUid} is not part of a recurring booking.`\n      );\n    }\n\n    return await this.getBooking(recurringBookingUid, authUser);\n  }\n\n  async markAbsent(\n    bookingUid: string,\n    bookingOwnerId: number,\n    body: MarkAbsentBookingInput_2024_08_13,\n    userUuid: string\n  ) {\n    const bodyTransformed = this.inputService.transformInputMarkAbsentBooking(body);\n    const bookingBefore = await this.bookingsRepository.getByUid(bookingUid);\n\n    if (!bookingBefore) {\n      throw new NotFoundException(`Booking with uid=${bookingUid} not found.`);","sourceCodeStart":920,"sourceCodeEnd":956,"githubUrl":"https://github.com/calcom/cal.diy/blob/176037d0afbe572f870a3c702985e7cd83fe6c0c/apps/api/v2/src/platform/bookings/2024-08-13/services/bookings.service.ts#L920-L956","documentation":"Thrown by getAllRecurringBookingsByIndividualUid when the booking identified by bookingUid has no recurringEventId — i.e. it is a standalone booking, not part of a recurring series. Triggered when cancelSubsequentBookings is requested on a non-recurring booking. BadRequestException (HTTP 400).","triggerScenarios":"A cancel or fetch request with cancelSubsequentBookings=true (or equivalent recurring expansion) on a booking that is not a member of a recurring series.","commonSituations":"UI offers 'cancel all subsequent' for non-recurring bookings; logic assumes recurring based on event type but the booking was created as a single instance.","solutions":["Only set cancelSubsequentBookings when the booking's recurringEventId is non-null.","Fetch the booking first and branch: if recurringEventId present, allow bulk; else single cancel.","Update event type to enable recurring schedules if bulk cancel is required."],"exampleFix":"// before\nawait client.delete(`/v2/bookings/${uid}`, { data: { cancelSubsequentBookings: true } });\n// after\nconst b = await client.get(`/v2/bookings/${uid}`);\nawait client.delete(`/v2/bookings/${uid}`, { data: { cancelSubsequentBookings: !!b.recurringEventId } });","handlingStrategy":"validation","validationCode":"const b = await client.get(`/v2/bookings/${uid}`);\nif (!b.recurringEventId) throw new Error('Booking is not recurring; cannot cancel subsequent');","typeGuard":"function isRecurring(b: { recurringEventId?: string | null }): boolean {\n  return !!b.recurringEventId;\n}","tryCatchPattern":"try { await client.delete(`/v2/bookings/${uid}`, { data: { cancelSubsequentBookings: true } }); }\ncatch (e) {\n  if (e.status === 400 && /not part of a recurring/i.test(e.message)) { /* retry without the flag */ }\n  else throw e;\n}","preventionTips":["Check recurringEventId before enabling bulk options in UI","Gate cancelSubsequentBookings on a recurring check","Only expose 'cancel all' for recurring bookings"],"tags":["api-v2","bookings","recurring","validation"],"backgroundTag":null,"analyzedSha":"176037d0afbe572f870a3c702985e7cd83fe6c0c","analyzedAt":"2026-08-12T19:12:41.464Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}