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
- Confirm the booking exists via GET /v2/bookings/:uid before marking absent.
- Use the uid from the booking creation response or a fresh listing.
- 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
- Verify booking existence before marking absent
- Use fresh uids from creation or listing
- Handle 404 gracefully in no-show automation
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
- Booking with uid=${uid} was not found in the database
- Booking with seatUid=${seatUid} was not found in the databas
- Booking with uid=${bookingUid} was not found in the database
- Team with slug ${body.teamSlug} not found
- Bookings can only be marked as absent after their scheduled
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/091d8b6de5709e0c.
Report an issue: GitHub.