calcom/cal.diy · error · BadRequestException
One of the hosts either already has booking at this time or
Error message
One of the hosts either already has booking at this time or is not available
What it means
Thrown by handleBookingError when the underlying booking engine raised 'no_available_users_found_error' AND bookingTeamEventType is true. BadRequestException (HTTP 400). It signals that for a team event type no host was both free and available at the requested slot (the team-aware variant of error 327).
Source
Thrown at apps/api/v2/src/platform/bookings/2024-08-13/services/errors.service.ts:40
throw new NotFoundException(
`Event type with slug ${body.eventTypeSlug} belonging to team ${body.teamSlug} not found.`
);
}
if (body.teamSlug && body.eventTypeSlug && body.organizationSlug) {
throw new NotFoundException(
`Event type with slug ${body.eventTypeSlug} belonging to team ${body.teamSlug} within organization ${body.organizationSlug} not found.`
);
}
throw new NotFoundException(`Event type with id ${body.eventTypeId} not found.`);
}
handleBookingError(error: unknown, bookingTeamEventType: boolean): never {
const hostsUnavaile = "One of the hosts either already has booking at this time or is not available";
if (error instanceof Error) {
if (error.message === "no_available_users_found_error") {
if (bookingTeamEventType) {
throw new BadRequestException(hostsUnavaile);
}
throw new BadRequestException("User either already has booking at this time or is not available");
} else if (error.message === "booking_time_out_of_bounds_error") {
throw new BadRequestException(
`The event type can't be booked at the "start" time provided. This could be because it's too soon (violating the minimum booking notice) or too far in the future (outside the event's scheduling window). Try fetching available slots first using the GET /v2/slots endpoint and then make a booking with "start" time equal to one of the available slots.`
);
} else if (error.message === "Attempting to book a meeting in the past.") {
throw new BadRequestException("Attempting to book a meeting in the past.");
} else if (error.message === "hosts_unavailable_for_booking") {
throw new BadRequestException(hostsUnavaile);
} else if (error.message === "booker_limit_exceeded_error") {
throw new BadRequestException(
"Attendee with this email can't book because the maximum number of active bookings has been reached."
);
} else if (error.message === "booker_limit_exceeded_error_reschedule") {
const errorData =
"data" in error ? (error.data as { rescheduleUid: string }) : { rescheduleUid: undefined };
let message =View on GitHub (pinned to 176037d0af)
Solutions
- Call GET /v2/slots for the event type and only POST a start time that appears in the available slots.
- Expand the host pool or host working hours for the requested window.
- Offer adjacent slots to the booker instead of retrying the same start time.
- Verify hosts are not all on out-of-office / blocked-calendar events.
Example fix
// before
await api.post('/v2/bookings', { eventTypeId, start: '2026-08-12T10:00:00Z', ... });
// after
const slots = await api.get(`/v2/slots?eventTypeId=${eventTypeId}&startTime=...&endTime=...`);
const start = slots.data.slots[0]?.start;
if (!start) throw new Error('no hosts available — pick another window');
await api.post('/v2/bookings', { eventTypeId, start, ... }); Defensive patterns
Strategy: validation
Validate before calling
const slots = await api.get(`/v2/slots?eventTypeId=${eventTypeId}&startTime=${from}&endTime=${to}`);
if (!slots.data.slots.length) throw new Error('no hosts available — pick another window');
body.start = slots.data.slots[0].start; Type guard
null
Try / catch
try { await api.post('/v2/bookings', body); }
catch (e) {
if (e.response?.status === 400 && /hosts.*already has booking/.test(e.response.data.message)) {
/* re-fetch slots and retry with an available start */
} else throw e;
} Prevention
- Always book a start time returned by GET /v2/slots.
- Expand the host pool or working hours for high-demand windows.
- Surface adjacent slots to the booker instead of retrying the rejected time.
When it happens
Trigger: Booking a team/collective/round-robin event type where every host either has a conflicting booking or has marked themselves unavailable for that time. The booking engine returns no_available_users_found_error; the service maps it to this team-specific message when bookingTeamEventType is true.
Common situations: Round-robin pool is fully booked at peak hours; collective event type requires all hosts and one is busy; hosts on vacation/no-show; buffer time or working-hours configuration excludes the slot for all hosts; event-type hosts list is empty.
Related errors
- Event type with slug ${body.eventTypeSlug} belonging to team
- Event type with slug ${body.eventTypeSlug} belonging to team
- User either already has booking at this time or is not avail
- The event type can't be booked at the "start" time provided.
- Event type with slug ${body.eventTypeSlug} belonging to user
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/3c210e7782ce63cf.
Report an issue: GitHub.