jackwener/OpenCLI · warning · EmptyResultError

youdao note

Error message

youdao note

What it means

EmptyResultError thrown by normalizeExtractionResult when the page's body text classifies as 'not_found' (share cancelled, note missing/expired, 404). The message 'youdao note' is the command/source field; the note simply has no accessible content, so there is no result row.

Source

Thrown at clis/youdao/note.js:184

      }
      return [true, title, content, summary, keywords.join(' | '), contentData.ct || null, contentData.sz || null, hasContentField, rawContent.length, window.location.href];
    })()
  `;
}

function normalizeExtractionResult(payload, sourceUrl) {
  const data = unwrapEvaluateResult(payload);
  if (!Array.isArray(data)) {
    throw new CommandExecutionError('Youdao note extractor returned a malformed payload');
  }
  const ok = data[0] === true;
  if (!ok) {
    const reason = typeof data[1] === 'string' && data[1].trim() ? data[1].trim() : 'unknown_parser_failure';
    if (reason === 'auth') {
      throw new AuthRequiredError('note.youdao.com', 'Youdao shared note requires login or additional permission');
    }
    if (reason === 'not_found') {
      throw new EmptyResultError('youdao note', 'The shared note is missing, expired, cancelled, or inaccessible.');
    }
    throw new CommandExecutionError(`Youdao note parser failed: ${reason}`);
  }
  const title = String(data[1] ?? '');
  const content = String(data[2] ?? '');
  const summary = String(data[3] ?? '');
  const keywords = String(data[4] ?? '');
  const createTime = data[5];
  const fileSize = data[6];
  const hasContentField = data[7] === true;
  const rawContentLength = Number(data[8] ?? 0);
  const finalUrl = String(data[9] || sourceUrl);
  if (!title) {
    throw new CommandExecutionError('Youdao note parser did not extract a title');
  }
  if (!hasContentField) {
    throw new CommandExecutionError('Youdao note parser did not find full note content in the page store');
  }

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Confirm the URL opens the actual note in a normal browser; if it 404s, the link is dead
  2. Ask the owner to re-share and regenerate a new share URL
  3. Remove the stale URL from your dataset/crawl list
  4. Double-check the id query parameter matches exactly (no truncation or typos)
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await youdaoNote(url);
} catch (e) {
  if (e.name === 'EmptyResultError' || /missing, expired, cancelled/.test(String(e.message))) {
    // mark the URL dead in your dataset and continue; optionally request a fresh share link
  } else throw e;
}

Prevention

When it happens

Trigger: The note owner cancelled the share; the share link expired; the note was deleted; the id is wrong/typo'd; Youdao returns its '不存在/已过期/404' page for the given URL.

Common situations: Crawling an old list of share links where many have expired; users copying truncated/incorrect ids; notes deleted after being shared; long-running scripts whose cached URLs have lapsed.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/352107dafe537b1d. Report an issue: GitHub.