jackwener/OpenCLI · warning · CliError
EMPTY_RESULT
EMPTY_RESULT
Error message
EMPTY_RESULT
What it means
The transcript metadata response contained neither `transcriptUrl` nor `url`, so the CLI throws CliError EMPTY_RESULT with the hint that the episode may not have transcript data available. This distinguishes 'no transcript exists' from a hard parse failure.
Source
Thrown at clis/xiaoyuzhou/transcript.js:51
if (!episode) {
throw new CliError('NOT_FOUND', 'Episode not found', 'Please check the episode ID');
}
const mediaId = String(episode.transcript?.mediaId || episode.media?.id || episode.transcriptMediaId || '').trim();
if (!mediaId) {
throw new CliError('PARSE_ERROR', 'mediaId not found in episode payload', 'Transcript metadata requires episode.transcript.mediaId, episode.media.id, or episode.transcriptMediaId');
}
const transcriptResponse = await requestXiaoyuzhouJson('/v1/episode-transcript/get', {
method: 'POST',
body: {
eid: kwargs.id,
mediaId,
},
credentials,
});
const transcriptMeta = transcriptResponse.data;
const transcriptUrl = String(transcriptMeta?.transcriptUrl || transcriptMeta?.url || '').trim();
if (!transcriptUrl) {
throw new CliError('EMPTY_RESULT', 'Transcript URL not found', 'This episode may not have transcript data available');
}
const transcriptBody = await fetchXiaoyuzhouTranscriptBody(transcriptUrl);
const { text, segmentCount } = extractTranscriptText(transcriptBody);
if (kwargs.text !== false && transcriptBody.trim() && !text.trim()) {
throw new CliError('PARSE_ERROR', 'Failed to extract transcript text', 'Transcript payload format is unsupported. Re-run with --json true to inspect the raw payload.');
}
const outputDir = path.join(String(kwargs.output || './xiaoyuzhou-transcripts'), String(kwargs.id));
fs.mkdirSync(outputDir, { recursive: true });
const jsonPath = path.join(outputDir, 'transcript.json');
const textPath = path.join(outputDir, 'transcript.txt');
if (kwargs.json !== false) {
fs.writeFileSync(jsonPath, transcriptBody, 'utf-8');
}
if (kwargs.text !== false) {
fs.writeFileSync(textPath, text, 'utf-8');
}
return [{
title: episode.title || 'episode',View on GitHub (pinned to 49907e53dc)
Solutions
- Confirm the episode shows a transcript in the xiaoyuzhou app before retrying
- Retry later if the transcript is still generating
- Verify the eid belongs to a transcript-enabled episode type
- Check xiaoyuzhou service status if many episodes return empty metadata
Defensive patterns
Strategy: fallback
Validate before calling
const meta = transcriptResponse?.data; const url = String(meta?.transcriptUrl || meta?.url || '').trim(); if (!url) return null; // no transcript available
Type guard
const hasTranscriptUrl = (m) => Boolean(m && (m.transcriptUrl || m.url));
Try / catch
try { await transcript(eid); } catch (e) { if (String(e).includes('EMPTY_RESULT')) { console.warn('No transcript available for this episode'); return null; } throw e; } Prevention
- Treat missing transcripts as expected for some episodes
- Retry later for episodes with pending transcript generation
- Pre-verify transcript availability in the app
- Batch-run with per-episode error tolerance
When it happens
Trigger: Calling the transcript command for an episode whose /v1/episode-transcript/get response has empty/absent transcriptUrl and url fields — typically episodes without generated transcripts or a metadata-only empty payload.
Common situations: Very new or very old episodes without ASR transcripts, episodes where transcript generation is still pending, region/permission-restricted metadata, or API responses degraded to empty objects during incidents.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No prices returned for train_no=${trainNo} ${fromStation.nam
- No 12306 stations match "${keyword}"
- CoinGecko returned no category data.
- coingecko top
- coingecko returned no trending coins.
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/25d7ad4039484518.
Report an issue: GitHub.