Skip to main content

Trip-Related Errors

Raised when a trip booking fails validation during checkout.

Which errors are possible depends on whether the trip has a proposal: without one the order is checked against a single budget, with one the cost is split per traveller and each traveller is checked on their own.

Trip without a proposal​

ErrorMeaning
insufficient_cost_center_balanceThe cost center's balance is less than the current order amount.
insufficient_monthly_limitThe monthly limit is less than the current order amount.

Trip with a proposal​

ErrorMeaning
insufficient_cost_center_balance_user_id_*Per-traveller split — the cost center's balance is less than the current order amount for the traveller whose id is appended to the code. See below.
invalid_guestsThe guest emails given for a room_index don't match the trip's travellers.
selected_travellersA traveller on the flight booking already has a booking for an itinerary.

Matching the per-traveller balance error​

The full code is:

Per-traveller cost center failure
insufficient_cost_center_balance_user_id_<user_id>

It carries the traveller's id in its suffix — insufficient_cost_center_balance_user_id_42 for user 42 — so a client cannot match it by equality. Match on the insufficient_cost_center_balance_user_id_ prefix and read the id off the end.

It is the same underlying condition as insufficient_cost_center_balance, at a different granularity: without a proposal the whole order is charged against one budget, so one error is enough; with a proposal the cost is split across travellers, so the failure has to say which traveller's cost center came up short.

Still to document​

  • Which checkout operations raise these.
  • Whether several insufficient_cost_center_balance_user_id_* errors can come back at once (one per failing traveller) or only the first failure is reported.
  • Whether a per-traveller equivalent of insufficient_monthly_limit exists for proposal trips.
  • What room_index indexes, and the shape of the guest payload invalid_guests validates.
  • HTTP status and wire format — the tables give the codes, not the response envelope.