booking_error

Booking.com had an outage or timed out. The request is fine; retry with backoff.

HTTP 502An upstream channel failed to complete the request. Safe to retry with backoff.

When it fires

Booking.com did not complete the request: a server error, a timeout, or a connection that failed on their side. Nothing about the request needs to change.

message carries whatever Booking.com said, when they said anything at all.

Response shape

Every Repull error follows the same envelope. The code is stable and safe to switch on.

{
  "error": {
    "code": "booking_error",
    "message": "Upstream 503 from provider",
    "fix": "Booking.com did not complete the request (an outage, timeout or server error on their side). Nothing about the request needs to change: retry with exponential backoff.",
    "docs_url": "https://repull.dev/docs/errors/booking_error",
    "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
    "upstream_status": 503
  }
}

How to fix

  1. Retry with exponential backoff — the request itself is fine.
  2. If it persists for more than a few minutes, check Booking.com's connectivity status before changing anything in your code.
  3. For a write, read the current state back with `GET /v1/channels/booking/availability` before retrying, so you know whether it landed.

Common gotchas

  • Different from booking_rejected. A booking_rejected (422) will be refused identically forever, so retrying it is pointless. This one is worth retrying.
  • A timeout is not proof the write did not land. Re-read the nights before assuming it has to be re-sent — though sending the same values twice is harmless.

Examples

curl

curl "https://api.repull.dev/v1/channels/booking/availability?property_id=1234567&start_date=2026-07-01&number_of_days=7" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
# Read the nights back before retrying a write that answered 502

TypeScript

for (let attempt = 0; attempt < 5; attempt++) {
  const res = await fetch('https://api.repull.dev/v1/channels/booking/availability', {
    method: 'PUT',
    headers: {
      Authorization: `Bearer ${process.env.REPULL_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify(body),
  })
  if (res.status !== 502) break
  await new Promise(r => setTimeout(r, 1_000 * 2 ** attempt))
}

If you're an AI agent

Booking.com had an outage or timed out. The request is fine — retry with exponential backoff. If you are retrying a write, read the nights back first, since a timeout does not prove the write failed.

Hit an error that isn't covered? Email hello@repull.dev with the request id from the response headers.

AI