{"record":{"id":"c2a4cea3bcc715f4","repo":"facebook/docusaurus","slug":"can-t-process-doc-metadata-for-doc-at-path-path","errorCode":null,"errorMessage":"Can't process doc metadata for doc at path path=${args.docFile.filePath} in version name=${args.versionMetadata.versionName}","messagePattern":"Can't process doc metadata for doc at path path=(.+?) in version name=(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/docusaurus-plugin-content-docs/src/docs.ts","lineNumber":259,"sourceCode":"    lastUpdatedBy: lastUpdate.lastUpdatedBy,\n    lastUpdatedAt: lastUpdate.lastUpdatedAt,\n    sidebarPosition,\n    frontMatter,\n  };\n}\n\nexport async function processDocMetadata(args: {\n  docFile: DocFile;\n  versionMetadata: VersionMetadata;\n  context: LoadContext;\n  options: MetadataOptions;\n  env: DocEnv;\n  tagsFile: TagsFile | null;\n}): Promise<DocMetadataBase> {\n  try {\n    return await doProcessDocMetadata(args);\n  } catch (err) {\n    throw new Error(\n      `Can't process doc metadata for doc at path path=${args.docFile.filePath} in version name=${args.versionMetadata.versionName}`,\n      {cause: err},\n    );\n  }\n}\n\nfunction getUnlistedIds(docs: DocMetadataBase[]): Set<string> {\n  return new Set(docs.filter((doc) => doc.unlisted).map((doc) => doc.id));\n}\n\nexport function addDocNavigation({\n  docs,\n  sidebarsUtils,\n}: {\n  docs: DocMetadataBase[];\n  sidebarsUtils: SidebarsUtils;\n}): LoadedVersion['docs'] {\n  const docsById = createDocsByIdIndex(docs);","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/facebook/docusaurus/blob/3f483e80e326cc646b54b83d564b3f0c4881b9a6/packages/docusaurus-plugin-content-docs/src/docs.ts#L241-L277","documentation":"Wrapper thrown by processDocMetadata when the inner doProcessDocMetadata rejects for any reason (parsing, slug, edit URL, tags, etc.). The original error is attached via {cause: err}. The message identifies the doc file path and version so you can locate the offending file; consult err.cause for the real reason.","triggerScenarios":"Any failure building a doc's metadata: bad front matter, invalid slug, error 36 (id with slash), tags file resolution error, or markdown parse failure. All are funneled through this wrapper.","commonSituations":"A newly added doc with broken front matter, an id containing '/', a missing referenced tags file, or a vcs/editUrl callback that throws.","solutions":["Inspect err.cause for the underlying error and fix it.","Open the doc file path printed in the message.","Re-run the build; sibling docs are processed independently."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await processDocMetadata(args);\n} catch (err) {\n  const cause = (err as Error & {cause?: Error}).cause;\n  console.error(`Doc ${args.docFile.filePath} failed:`, cause ?? err);\n}","preventionTips":["Read err.cause to find the real metadata failure.","Lint doc front matter (id, slug, tags) before building."],"tags":["docs","wrapper","cause","build"],"backgroundTag":null,"analyzedSha":"3f483e80e326cc646b54b83d564b3f0c4881b9a6","analyzedAt":"2026-08-12T13:25:04.382Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}