Cancellation emails sent to both customer and host within 60 seconds
Why it matters
A cancelled booking affects two parties: the customer loses their appointment and the host loses revenue. Notifying only the customer leaves the host scrambling — they may have already prepared, turned away other clients, or allocated staff. Notifying only the host violates the customer's reasonable expectation of a cancellation record. CWE-391 and ISO 25010 reliability.fault-tolerance apply to both sends: a retry-less single attempt means a provider outage at cancellation time silently strands one or both parties. Businesses handling volume bookings compound this into systematic host blindness whenever email infrastructure degrades.
Severity rationale
High because failing to notify the host of a cancellation causes real operational harm — wasted preparation, no-show assumptions, and revenue disputes — that a simple retry-equipped dual send prevents.
Remediation
Queue a single job that carries both recipient addresses, then fan out inside the worker. This ensures both sends share the same retry budget and the same transactional atomicity as the status change:
// src/lib/bookings.ts
async function cancelBooking(bookingId: string, cancelledBy: 'customer' | 'admin') {
const booking = await db.bookings.update(bookingId, {
status: 'cancelled',
cancelled_by: cancelledBy,
cancelled_at: new Date(),
})
await emailQueue.add(
'send-cancellation',
{
bookingId,
customerEmail: booking.customer_email,
hostEmail: booking.host_email,
cancelledBy,
},
{ attempts: 5, backoff: { type: 'exponential', delay: 2000 } }
)
}
Verify the worker sends to both customerEmail and hostEmail before marking the job complete.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Booking Notifications & Reminders Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-391 — Unchecked Error Condition
- iso-25010:2011 · reliability.fault-tolerance
Taxons
History
- 2026-04-18·v1.0.0·Initial import from booking-notifications-reminders·automated