calcom/cal.diy · error · NotFoundException
Booking with uid ${bookingUid} not found
Error message
Booking with uid ${bookingUid} not found What it means
A 404 NotFoundException thrown by BookingAttendeesService_2024_08_13.addAttendee when bookingsRepository.getByUidWithEventType(bookingUid) returns null. This means no booking record exists with the given UID. The addAttendee endpoint requires a valid existing booking to attach an attendee to.
Source
Thrown at apps/api/v2/src/platform/bookings/2024-08-13/services/booking-attendees.service.ts:78
},
{ strategy: "excludeAll" }
);
} catch (e) {
if (e instanceof ErrorWithCode && e.code === ErrorCode.NotFound) {
throw new NotFoundException(e.message);
}
throw e;
}
}
async addAttendee(
bookingUid: string,
input: AddAttendeeInput_2024_08_13,
user: ApiAuthGuardUser
): Promise<BookingAttendeeOutput_2024_08_13> {
const booking = await this.bookingsRepository.getByUidWithEventType(bookingUid);
if (!booking) {
throw new NotFoundException(`Booking with uid ${bookingUid} not found`);
}
const platformClientParams = booking.eventTypeId
? await this.platformBookingsService.getOAuthClientParams(booking.eventTypeId)
: undefined;
const emailsEnabled = platformClientParams ? platformClientParams.arePlatformEmailsEnabled : true;
const createdAttendee = await this.bookingAttendeesService.addAttendee({
bookingId: booking.id,
attendee: {
email: input.email,
name: input.name,
timeZone: input.timeZone,
phoneNumber: input.phoneNumber,
language: input.language,
},
user: {View on GitHub (pinned to 176037d0af)
Solutions
- Verify the bookingUid exists by calling GET /v2/bookings/{bookingUid} — if it also returns 404, the UID is wrong.
- Ensure you're sending the booking UID (a UUID-like string like 'abc-123-def-456'), not the numeric booking ID.
- Check that you're hitting the correct environment (staging vs production) with the correct UID.
- If the booking was deleted, you cannot add attendees to it — create a new booking instead.
Example fix
// before — sending numeric booking ID POST /v2/bookings/12345/attendees // after — sending the booking UID string POST /v2/bookings/L5JQpQf2W7mR3xKbN8vY/attendees
Defensive patterns
Strategy: validation
Validate before calling
// Verify the booking exists before adding an attendee
async function bookingExists(token, bookingUid) {
const res = await fetch(`/v2/bookings/${bookingUid}`, {
headers: { Authorization: `Bearer ${token}` }
});
return res.ok;
}
if (!(await bookingExists(token, bookingUid))) {
throw new Error(`Booking ${bookingUid} not found — cannot add attendee`);
} Try / catch
try {
await api.addAttendee(bookingUid, attendeeData);
} catch (err) {
if (err.statusCode === 404 && err.message.includes('not found')) {
// Booking doesn't exist — surface to user or create the booking first
console.error('Booking not found:', bookingUid);
} else { throw err; }
} Prevention
- Verify the booking UID exists via GET /v2/bookings/:bookingUid before adding attendees.
- Use booking UIDs (UUID strings), not numeric booking IDs.
- Store booking UIDs from the create-booking response and reuse them.
- Handle 404 gracefully by prompting the user to check the booking reference.
When it happens
Trigger: POST /v2/bookings/{bookingUid}/attendees where bookingUid doesn't match any booking in the database. Common causes: the UID was mistyped, the booking was deleted, the booking UID format is wrong (e.g., sending a numeric ID instead of a UUID-format UID).
Common situations: Client sends a booking ID (numeric) instead of a booking UID (UUID string). The booking was soft-deleted or hard-deleted. The bookingUid was copied incorrectly from a previous API response. Cross-environment confusion (using a staging UID against production). The booking is in a different database shard or organization.
Related errors
- Booking with uid ${bookingUid} not found
- Booking with uid ${uid} not found
- Event type with uid ${uid} not found
- error.message
- BookingPbacGuard - bookingUid is required
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/0641c335a955f0e4.
Report an issue: GitHub.