koala73/worldmonitor · warning · Error
no results
Error message
no results
What it means
Thrown inside the searchGoogleFlights cache producer when the relay returned 2xx but json.flights is not an array — the body's error field is re-thrown if present, otherwise 'no results'. The outer catch converts it to {flights: [], degraded: true, error: 'no results'}; the identical string is also returned (without throwing) when cachedFetchJson yields null.
Source
Thrown at server/worldmonitor/aviation/v1/search-google-flights.ts:64
}
// Cache key uses a sorted-airlines axis so input order doesn't fragment cache hits;
// the relay still receives airlines in the caller's order via `params`.
const sortedAirlinesKey = [...airlines].sort().join(',');
const cacheKey = `aviation:gf:${origin}:${destination}:${departureDate}:${req.returnDate ?? ''}:${req.cabinClass ?? ''}:${req.maxStops ?? ''}:${req.departureWindow ?? ''}:${req.sortBy ?? ''}:${passengers}:${sortedAirlinesKey}:v1`;
try {
const data = await cachedFetchJson<{ flights: unknown[] }>(
cacheKey,
CACHE_TTL,
async () => {
const resp = await fetch(`${relayBaseUrl}/google-flights/search?${params}`, {
headers: getRelayHeaders(),
signal: AbortSignal.timeout(20_000),
});
if (!resp.ok) throw new Error(`relay returned ${resp.status}`);
const json = (await resp.json()) as { flights?: unknown[]; error?: string };
if (!Array.isArray(json.flights)) throw new Error(json.error ?? 'no results');
return { flights: json.flights };
},
);
if (!data) {
return { flights: [], degraded: true, error: 'no results' };
}
return {
flights: data.flights as SearchGoogleFlightsResponse['flights'],
degraded: false,
error: '',
};
} catch (err) {
return { flights: [], degraded: true, error: err instanceof Error ? err.message : 'search failed' };
}
}
View on GitHub (pinned to 9361220cc0)
Solutions
- Sanity-check the query (valid IATA pair, future departure date, supported cabin/stops values)
- Treat degraded=true + 'no results' as retryable upstream unavailability, not a definitive empty set
- Check relay logs if valid queries consistently degrade — scraper health is the usual culprit
Defensive patterns
Strategy: fallback
Validate before calling
// cheap client-side sanity before the call
if (!origin || !destination || !departureDate) return skip('missing flight search params'); Type guard
function isNoResultsFlights(r: { degraded: boolean; error: string }): boolean {
return r.degraded && r.error === 'no results';
} Try / catch
const res = await searchGoogleFlights(req); if (isNoResultsFlights(res)) return offerRetry(); // scrape may have failed — not a definitive answer
Prevention
- Distinguish degraded 'no results' from a genuine empty schedule in UI copy
- Keep last-known-good flight data in client state to ride out relay scrape failures
- Monitor the ratio of degraded responses per route to detect scraper blocking early
When it happens
Trigger: Relay 200 with {error: ...} because the Google Flights scrape failed (anti-bot, captcha); relay schema drift where flights is missing or an object; legitimately unavailable route/date combination reported via error.
Common situations: Scraper blocked by upstream anti-bot measures; cabin class / passenger combinations the relay cannot serve; relay response-shape change after an update.
Related errors
- no results
- relay returned ${resp.status}
- relay returned ${resp.status}
- Railway relay unavailable for relay-only domain: ${hostname}
AI-assisted analysis of koala73/worldmonitor@9361220cc0 (2026-08-21).
Data as JSON: /api/errors/2a575580a06bd298.
Report an issue: GitHub.