calcom/cal.diy · error · HttpException
Failed to add guests to the booking
Error message
Failed to add guests to the booking
What it means
A 500 HttpException thrown by BookingGuestsService_2024_08_13.addGuests when the addGuestsHandler returns successfully but its response message is not the expected 'Guests added' string. This indicates the handler completed without throwing but didn't perform the expected operation — an unexpected internal state.
Source
Thrown at apps/api/v2/src/platform/bookings/2024-08-13/services/booking-guests.service.ts:55
);
}
const platformClientParams = booking.eventTypeId
? await this.platformBookingsService.getOAuthClientParams(booking.eventTypeId)
: undefined;
const emailsEnabled = platformClientParams ? platformClientParams.arePlatformEmailsEnabled : true;
const res = await addGuestsHandler({
ctx: { user },
input: { bookingId: booking.id, guests: input.guests },
emailsEnabled,
actionSource: "API_V2",
});
if (res.message === "Guests added") {
return await this.bookingsService.getBooking(bookingUid, user);
} else {
throw new HttpException(
"Failed to add guests to the booking",
500
);
}
}
}
View on GitHub (pinned to 176037d0af)
Solutions
- Check server logs — addGuestsHandler may log the specific reason it didn't return 'Guests added'.
- Verify the booking is in a state that supports guest addition (ACCEPTED or PENDING, not CANCELLED).
- Check if any of the guest emails are already registered as attendees — duplicates may cause a non-success message.
- If using platform OAuth client settings, verify arePlatformEmailsEnabled and related settings aren't causing a silent rejection.
- Report to Cal.com if the handler returns an unexpected message with no logged explanation — this may be a bug.
Defensive patterns
Strategy: try-catch
Try / catch
try {
await api.addGuests(bookingUid, guests);
} catch (err) {
if (err.statusCode === 500 && err.message === 'Failed to add guests to the booking') {
// Unexpected internal state — check server logs and retry once
console.error('Guest addition returned unexpected state for booking', bookingUid);
await api.addGuests(bookingUid, guests); // single retry
} else { throw err; }
} Prevention
- Verify the booking is in an active state (ACCEPTED/PENDING) before adding guests.
- Check for duplicate guest emails — duplicates may cause a non-success handler response.
- If using OAuth client settings, verify arePlatformEmailsEnabled is configured correctly.
- Log the full request payload when this error occurs to help diagnose the handler's unexpected response.
When it happens
Trigger: POST /v2/bookings/{bookingUid}/guests where addGuestsHandler (from @calcom/platform-libraries/bookings) resolves without throwing but returns a response object whose .message field is something other than 'Guests added'. This could be a partial success, a silent failure, or a version mismatch in the handler's response contract.
Common situations: The addGuestsHandler internally encounters an issue (e.g., email delivery disabled, attendee already exists) and returns a different message instead of throwing. A library version mismatch where the handler's response message format changed. An edge case in the handler logic where the booking is in a transitional state.
Related errors
- error?.message ?? errMsg
- errMsg
- Booking with uid ${bookingUid} not found
- Cannot add ${newGuestCount} guests. This booking already has
- Booking with uid ${uid} not found
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/06e7b3cc7ca282db.
Report an issue: GitHub.