{"record":{"id":"3831d6dd7f967cd6","repo":"facebook/docusaurus","slug":"processing-of-blog-source-file-path-blogsourcefi","errorCode":null,"errorMessage":"Processing of blog source file path=${blogSourceFile} failed.","messagePattern":"Processing of blog source file path=(.+?) failed\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/docusaurus-plugin-content-blog/src/blogUtils.ts","lineNumber":416,"sourceCode":"  }\n\n  const blogSourceFiles = await Globby(include, {\n    cwd: contentPaths.contentPath,\n    ignore: exclude,\n  });\n\n  async function doProcessBlogSourceFile(blogSourceFile: string) {\n    try {\n      return await processBlogSourceFile(\n        blogSourceFile,\n        contentPaths,\n        context,\n        options,\n        tagsFile,\n        authorsMap,\n      );\n    } catch (err) {\n      throw new Error(\n        `Processing of blog source file path=${blogSourceFile} failed.`,\n        {cause: err},\n      );\n    }\n  }\n\n  const blogPosts = (\n    await Promise.all(blogSourceFiles.map(doProcessBlogSourceFile))\n  ).filter(Boolean) as BlogPost[];\n\n  blogPosts.sort(\n    (a, b) => b.metadata.date.getTime() - a.metadata.date.getTime(),\n  );\n\n  if (options.sortPosts === 'ascending') {\n    return blogPosts.reverse();\n  }\n  return blogPosts;","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/facebook/docusaurus/blob/3f483e80e326cc646b54b83d564b3f0c4881b9a6/packages/docusaurus-plugin-content-blog/src/blogUtils.ts#L398-L434","documentation":"Wrapper error thrown by doProcessBlogSourceFile when the underlying processBlogSourceFile rejects for any reason. The original error is attached via {cause: err}. The message identifies the blog source file path that failed, so you can locate the offending post even though the inner cause carries the specifics.","triggerScenarios":"Any failure while processing a single blog markdown/mdx file: bad front matter, missing author key, invalid slug, parse error, or a thrown validation error from authors/tags normalization. All such failures are funneled through this wrapper.","commonSituations":"A newly added blog post with malformed YAML, a removed author key referenced in front matter, or an invalid date/slug. CI fails with this message and the actual cause is in err.cause.","solutions":["Read err.cause for the real underlying error and fix that.","Open the blog source file printed in the message.","After fixing, re-run the build; processing is parallel so multiple posts may fail independently."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await processBlogSourceFile(...);\n} catch (err) {\n  const cause = (err as Error & {cause?: Error}).cause;\n  console.error('Blog file failed:', cause ?? err);\n  // fix per cause.message, then retry this file only\n}","preventionTips":["Always read err.cause for wrapped processing errors.","Lint blog front matter locally before pushing."],"tags":["blog","wrapper","cause","build"],"backgroundTag":null,"analyzedSha":"3f483e80e326cc646b54b83d564b3f0c4881b9a6","analyzedAt":"2026-08-12T13:25:04.382Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}