{"record":{"id":"1cf57172ce4a42f0","repo":"jackwener/OpenCLI","slug":"not-found-1cf571","errorCode":"NOT_FOUND","errorMessage":"NOT_FOUND","messagePattern":"NOT_FOUND","errorType":"error_code","errorClass":"CliError","httpStatus":null,"severity":"error","filePath":"clis/xiaoyuzhou/transcript.js","lineNumber":34,"sourceCode":"        { name: 'id', positional: true, required: true, help: 'Episode ID (eid from podcast-episodes output)' },\n        { name: 'output', default: './xiaoyuzhou-transcripts', help: 'Output directory' },\n        { name: 'json', type: 'boolean', default: true, help: 'Save transcript JSON file' },\n        { name: 'text', type: 'boolean', default: true, help: 'Save extracted transcript text file' },\n    ],\n    columns: ['title', 'podcast', 'status', 'segments', 'json_file', 'text_file'],\n    func: async (kwargs) => {\n        if (kwargs.json === false && kwargs.text === false) {\n            throw new ArgumentError('At least one of --json or --text must be enabled', 'Example: opencli xiaoyuzhou transcript 69dd0c98e2c8be31551f6a33 --text true');\n        }\n        let credentials = loadXiaoyuzhouCredentials();\n        const episodeResponse = await requestXiaoyuzhouJson('/v1/episode/get', {\n            query: { eid: kwargs.id },\n            credentials,\n        });\n        credentials = episodeResponse.credentials;\n        const episode = episodeResponse.data;\n        if (!episode) {\n            throw new CliError('NOT_FOUND', 'Episode not found', 'Please check the episode ID');\n        }\n        const mediaId = String(episode.transcript?.mediaId || episode.media?.id || episode.transcriptMediaId || '').trim();\n        if (!mediaId) {\n            throw new CliError('PARSE_ERROR', 'mediaId not found in episode payload', 'Transcript metadata requires episode.transcript.mediaId, episode.media.id, or episode.transcriptMediaId');\n        }\n        const transcriptResponse = await requestXiaoyuzhouJson('/v1/episode-transcript/get', {\n            method: 'POST',\n            body: {\n                eid: kwargs.id,\n                mediaId,\n            },\n            credentials,\n        });\n        const transcriptMeta = transcriptResponse.data;\n        const transcriptUrl = String(transcriptMeta?.transcriptUrl || transcriptMeta?.url || '').trim();\n        if (!transcriptUrl) {\n            throw new CliError('EMPTY_RESULT', 'Transcript URL not found', 'This episode may not have transcript data available');\n        }","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/xiaoyuzhou/transcript.js#L16-L52","documentation":"GET /v1/episode/get for the given eid returned no episode object, so the CLI throws CliError NOT_FOUND with hint 'Please check the episode ID'. This check runs before extracting the transcript mediaId, since nothing can proceed without the episode payload.","triggerScenarios":"Calling `opencli xiaoyuzhou transcript <eid>` with an eid that doesn't exist, has been deleted, is behind a paywall/private episode, or credentials lacking access to that episode.","commonSituations":"Transcribing an episode that was taken down, typos or truncation in the eid, using a pid instead of an eid, or expired credentials making the API return an empty data payload.","solutions":["Verify the episode ID (eid) is correct and complete","Confirm the episode still exists in the xiaoyuzhou app","Re-authenticate / refresh credentials and retry","Use the podcast-episodes command to list valid eids for the podcast"],"exampleFix":"// before\nopencli xiaoyuzhou transcript <pid>\n// after\nopencli xiaoyuzhou transcript 69dd0c98e2c8be31551f6a33","handlingStrategy":"try-catch","validationCode":"if (typeof eid !== 'string' || eid.length < 16) throw new Error('eid looks invalid');","typeGuard":null,"tryCatchPattern":"try { await transcript(eid); } catch (e) { if (String(e).includes('NOT_FOUND')) { console.error(`Episode ${eid} not found; check eid or re-auth`); return null; } throw e; }","preventionTips":["List valid eids via podcast-episodes before transcribing","Re-authenticate when many lookups return empty data","Confirm the episode still exists in the app","Keep eids unmodified (no truncation, no query params)"],"tags":["cli","not-found","transcript"],"backgroundTag":"resource-not-found","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}