calcom/cal.diy · error · BadRequestException
Can't reschedule booking with uid=${bookingUid} because it h
Error message
Can't reschedule booking with uid=${bookingUid} because it has been cancelled. Please provide uid of a booking that is not cancelled. What it means
Thrown by canRescheduleBooking when the booking exists but its status is CANCELLED and the rescheduled flag is false. This is a hard block: a cancelled booking cannot be rescheduled. BadRequestException (HTTP 400).
Source
Thrown at apps/api/v2/src/platform/bookings/2024-08-13/services/bookings.service.ts:830
booking.seatReferenceUid || "",
userIsEventTypeAdminOrOwner
);
return Object.assign(outputBooking, { isPlatformManagedUserBooking });
}
const outputBooking = await this.outputService.getOutputBooking(databaseBooking);
return Object.assign(outputBooking, { isPlatformManagedUserBooking });
} catch (error) {
this.errorsBookingsService.handleBookingError(error, false);
}
}
async canRescheduleBooking(bookingUid: string) {
const booking = await this.bookingsRepository.getByUid(bookingUid);
if (!booking) {
throw new Error(`Booking with uid=${bookingUid} was not found in the database`);
}
if (booking.status === "CANCELLED" && !booking.rescheduled) {
throw new BadRequestException(
`Can't reschedule booking with uid=${bookingUid} because it has been cancelled. Please provide uid of a booking that is not cancelled.`
);
}
if (booking.status === "CANCELLED" && booking.rescheduled) {
const rescheduledTo = await this.bookingsRepository.getByFromReschedule(bookingUid);
throw new BadRequestException(
`Can't reschedule booking with uid=${bookingUid} because it has been cancelled and rescheduled already to booking with uid=${rescheduledTo?.uid}. You probably want to reschedule ${rescheduledTo?.uid} instead by passing it within the request URL.`
);
}
return booking;
}
async shouldRescheduleIndividualSeat(
bookingUid: string,
isIndividualSeatReschedule: boolean,
authUser: AuthOptionalUser
) {
const booking = await this.bookingsRepository.getByUidWithUserIdAndSeatsReferencesCount(bookingUid);View on GitHub (pinned to 176037d0af)
Solutions
- Create a new booking instead of rescheduling a cancelled one.
- Check booking.status === 'CANCELLED' before attempting reschedule and branch to rebook flow.
- Re-fetch the booking to confirm its current status before calling reschedule.
Example fix
// before
await client.post(`/v2/bookings/${uid}/reschedule`, body);
// after
const b = await client.get(`/v2/bookings/${uid}`);
if (b.status === 'CANCELLED') {
await client.post('/v2/bookings', newBookingBody);
} else {
await client.post(`/v2/bookings/${uid}/reschedule`, body);
} Defensive patterns
Strategy: validation
Validate before calling
const b = await client.get(`/v2/bookings/${uid}`);
if (b.status === 'CANCELLED') throw new Error('Cannot reschedule a cancelled booking; create a new one'); Type guard
function isReschedulable(b: { status: string }): boolean {
return b.status !== 'CANCELLED';
} Try / catch
try { await client.post(`/v2/bookings/${uid}/reschedule`, body); }
catch (e) {
if (e.status === 400 && /has been cancelled/.test(e.message) && !/rescheduled already/.test(e.message)) { /* route to new-booking flow */ }
else throw e;
} Prevention
- Check booking status before reschedule
- Branch to rebook when status is CANCELLED
- Keep client state in sync with cancellation webhooks
When it happens
Trigger: A reschedule request (POST /v2/bookings/:uid/reschedule or similar) targeting a booking whose status is CANCELLED and that has not already been rescheduled.
Common situations: User cancels then attempts to reschedule instead of rebooking; stale uid held in client state after a cancellation workflow.
Related errors
- Can't reschedule booking with uid=${bookingUid} because it h
- Team with slug ${body.teamSlug} not found
- Missing attendee phone number - it is required by the event
- Missing required booking field response: ${eventTypeBookingF
- Invalid option '${submittedValue}' for booking field '${even
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/7f2f4e17dc25f114.
Report an issue: GitHub.