{"record":{"id":"352107dafe537b1d","repo":"jackwener/OpenCLI","slug":"youdao-note","errorCode":null,"errorMessage":"youdao note","messagePattern":"youdao note","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/youdao/note.js","lineNumber":184,"sourceCode":"      }\n      return [true, title, content, summary, keywords.join(' | '), contentData.ct || null, contentData.sz || null, hasContentField, rawContent.length, window.location.href];\n    })()\n  `;\n}\n\nfunction normalizeExtractionResult(payload, sourceUrl) {\n  const data = unwrapEvaluateResult(payload);\n  if (!Array.isArray(data)) {\n    throw new CommandExecutionError('Youdao note extractor returned a malformed payload');\n  }\n  const ok = data[0] === true;\n  if (!ok) {\n    const reason = typeof data[1] === 'string' && data[1].trim() ? data[1].trim() : 'unknown_parser_failure';\n    if (reason === 'auth') {\n      throw new AuthRequiredError('note.youdao.com', 'Youdao shared note requires login or additional permission');\n    }\n    if (reason === 'not_found') {\n      throw new EmptyResultError('youdao note', 'The shared note is missing, expired, cancelled, or inaccessible.');\n    }\n    throw new CommandExecutionError(`Youdao note parser failed: ${reason}`);\n  }\n  const title = String(data[1] ?? '');\n  const content = String(data[2] ?? '');\n  const summary = String(data[3] ?? '');\n  const keywords = String(data[4] ?? '');\n  const createTime = data[5];\n  const fileSize = data[6];\n  const hasContentField = data[7] === true;\n  const rawContentLength = Number(data[8] ?? 0);\n  const finalUrl = String(data[9] || sourceUrl);\n  if (!title) {\n    throw new CommandExecutionError('Youdao note parser did not extract a title');\n  }\n  if (!hasContentField) {\n    throw new CommandExecutionError('Youdao note parser did not find full note content in the page store');\n  }","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/youdao/note.js#L166-L202","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Confirm the URL opens the actual note in a normal browser; if it 404s, the link is dead","Ask the owner to re-share and regenerate a new share URL","Remove the stale URL from your dataset/crawl list","Double-check the id query parameter matches exactly (no truncation or typos)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await youdaoNote(url);\n} catch (e) {\n  if (e.name === 'EmptyResultError' || /missing, expired, cancelled/.test(String(e.message))) {\n    // mark the URL dead in your dataset and continue; optionally request a fresh share link\n  } else throw e;\n}","preventionTips":["Treat EmptyResultError as a dead-link signal, not a bug","Periodically validate stored share links and prune expired ones","Verify ids exactly match the share dialog output","Ask owners to use non-expiring share settings where possible"],"tags":["empty-result","not-found","expired-share","content-availability"],"backgroundTag":"shared-note-expired-or-not-found","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}