jackwener/OpenCLI · error · CommandExecutionError
Trip.com bounced ${city} / ${airport} to the transfer landin
Error message
Trip.com bounced ${city} / ${airport} to the transfer landing; check the city name matches the airport IATA code What it means
CommandExecutionError thrown when Trip.com redirected the transfer search back to the generic airport-transfers landing page instead of a specific airport results page. The URL path regex /\/airport-transfers\/[^/]+\/airport-[^/]+/ fails, so the library concludes the city/airport combination did not resolve.
Source
Thrown at clis/trip/transfer.js:63
const city = parseKeyword('city', kwargs.city);
const airport = parseIataCode('airport', kwargs.airport);
const limit = parseListLimit(kwargs.limit);
const listUrl = buildTransferListUrl(city, airport);
await page.goto(listUrl);
const waitResult = await page.evaluate(WAIT_FOR_TRANSFERS_JS);
if (waitResult === 'captcha') {
throw new AuthRequiredError('trip.com', 'Trip.com is asking for a verification; complete it in your browser session and retry');
}
if (waitResult === 'empty') {
throw new EmptyResultError('trip transfer', `No airport transfers for ${city} (${airport})`);
}
if (waitResult !== 'content') {
throw new CommandExecutionError(`Trip.com transfer listing did not render (state=${String(waitResult)}); check the city and airport code`);
}
const landedPath = await page.evaluate('location.pathname');
if (!/\/airport-transfers\/[^/]+\/airport-[^/]+/i.test(String(landedPath))) {
throw new CommandExecutionError(`Trip.com bounced ${city} / ${airport} to the transfer landing; check the city name matches the airport IATA code`);
}
const raw = await page.evaluate(buildTransferExtractJs());
if (!Array.isArray(raw)) {
throw new CommandExecutionError('Trip.com transfer DOM extraction returned malformed rows');
}
if (raw.length === 0) {
throw new CommandExecutionError('Trip.com transfer cards rendered but parser did not find required price anchors');
}
return raw.slice(0, limit).map((r, i) => ({
rank: i + 1,
type: r.type,
passengers: r.passengers,
luggage: r.luggage,
price: r.price,
currency: r.currency,
url: listUrl,
}));
},View on GitHub (pinned to 49907e53dc)
Solutions
- Verify the city name matches the airport IATA code you passed
- Check Trip.com's URL scheme — if they redesigned paths, update the regex in the source
- Test the URL manually in a browser to see where Trip.com redirects
- Correct the airport code (e.g. Paris -> CDG/ORY, not LHR)
Example fix
// before
await getTransfers({ city: 'Paris', airport: 'LHR' }); // mismatch -> bounce
// after
await getTransfers({ city: 'London', airport: 'LHR' }); Defensive patterns
Strategy: validation
Validate before calling
// ensure city and airport actually correspond
const cityByIata = { LHR:'London', LGW:'London', CDG:'Paris', ORY:'Paris', JFK:'New York' };
if (cityByIata[airport] && cityByIata[airport].toLowerCase() !== city.toLowerCase()) {
throw new Error(`airport ${airport} does not match city ${city}`);
} Type guard
null
Try / catch
try {
const rows = await getTransfers(args);
} catch (e) {
if (e.message.includes('bounced')) {
console.error(`Check: does ${airport} belong to ${city}?`);
}
throw e;
} Prevention
- Map IATA codes to cities and validate pairs before calling
- Watch for Trip.com URL-scheme changes affecting the path regex
- Test new airport codes manually in a browser first
- Use full correct city names as Trip.com slugs expect them
When it happens
Trigger: Passing an airport IATA code that does not match the city (e.g. city 'Paris' with airport 'LHR'), a nonexistent airport code, or a city name Trip.com cannot map, causing a bounce to the landing/search page.
Common situations: Mismatched city–airport pairs when users copy codes from a different city; outdated airport codes; typos like 'LDN' instead of 'LON' city slugs; Trip.com changing its URL scheme so the regex no longer matches a valid result page.
Related errors
- google images returned a result row without stable external
- IMDb redirected to a different title: ${currentId}
- LinkedIn company extraction ended on a non-LinkedIn page
- LinkedIn messengerMessages discovery returned an invalid URL
- LinkedIn messengerMessages discovery returned an unsafe or m
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/34916d107ef0dbc6.
Report an issue: GitHub.