calcom/cal.diy · error · NotFoundException

Booking with uid=${bookingUid} not found.

Error message

Booking with uid=${bookingUid} not found.

What it means

Thrown by markAbsent when getByUid returns null for the provided bookingUid. The booking must exist before it can be marked as a no-show. NotFoundException (HTTP 404).

Source

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

      throw new BadRequestException(
        `Booking with bookingUid=${bookingUid} is not part of a recurring booking.`
      );
    }

    return await this.getBooking(recurringBookingUid, authUser);
  }

  async markAbsent(
    bookingUid: string,
    bookingOwnerId: number,
    body: MarkAbsentBookingInput_2024_08_13,
    userUuid: string
  ) {
    const bodyTransformed = this.inputService.transformInputMarkAbsentBooking(body);
    const bookingBefore = await this.bookingsRepository.getByUid(bookingUid);

    if (!bookingBefore) {
      throw new NotFoundException(`Booking with uid=${bookingUid} not found.`);
    }

    const nowUtc = DateTime.utc();
    const bookingStartTimeUtc = DateTime.fromJSDate(bookingBefore.startTime, { zone: "utc" });

    if (nowUtc < bookingStartTimeUtc) {
      throw new BadRequestException(
        `Bookings can only be marked as absent after their scheduled start time. Current time in UTC+0: ${nowUtc.toISO()}, Booking start time in UTC+0: ${bookingStartTimeUtc.toISO()}`
      );
    }

    const platformClientParams = bookingBefore?.eventTypeId
      ? await this.platformBookingsService.getOAuthClientParams(bookingBefore.eventTypeId)
      : undefined;

    await handleMarkNoShow({
      bookingUid,
      attendees: bodyTransformed.attendees,

View on GitHub (pinned to 176037d0af)

Solutions

  1. Confirm the booking exists via GET /v2/bookings/:uid before marking absent.
  2. Use the uid from the booking creation response or a fresh listing.
  3. Ensure the request targets the same Cal.com instance/environment.

Example fix

// before
await client.post(`/v2/bookings/${guessedUid}/mark-absent`, body);
// after
const b = await client.get(`/v2/bookings/${uid}`);
if (b) await client.post(`/v2/bookings/${b.uid}/mark-absent`, body);
Defensive patterns

Strategy: validation

Validate before calling

const b = await client.get(`/v2/bookings/${uid}`);
if (!b) throw new Error('Booking not found; cannot mark absent');

Type guard

function isExistingBooking<T>(b: T | null): b is T { return b !== null; }

Try / catch

try { await client.post(`/v2/bookings/${uid}/mark-absent`, body); }
catch (e) {
  if (e.status === 404 && /not found/i.test(e.message)) { /* skip or surface 'no such booking' */ }
  else throw e;
}

Prevention

When it happens

Trigger: A POST request to mark a booking absent (no-show) with a uid that does not match any booking.

Common situations: Typo in uid; booking deleted; uid from a different environment; calling markAbsent before the booking is fully committed.

Related errors


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