{"record":{"id":"bed4948baac5c6f3","repo":"serverless/serverless","slug":"path-not-found-product-docpath","errorCode":null,"errorMessage":"Path not found: ${product}/${docPath}","messagePattern":"Path not found: (.+?)/(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/mcp/src/tools/docs.js","lineNumber":113,"sourceCode":"        'Contents of all files in this directory:',\n        '',\n      ].join('\\n')\n\n      // Append all file contents\n      let fileContents = ''\n      for (const file of files) {\n        const filePath = path.join(fullPath, file)\n        const content = await fs.readFile(filePath, 'utf-8')\n        fileContents += `\\n\\n# ${file}\\n\\n${content}`\n      }\n\n      return dirListing + fileContents\n    }\n\n    // If it's a file, just read it\n    return fs.readFile(fullPath, 'utf-8')\n  } catch (error) {\n    throw new Error(`Path not found: ${product}/${docPath}`)\n  }\n}\n\n/**\n * Finds the nearest existing directory and lists its contents\n * @param {string} product - The product (sf)\n * @param {string} docPath - Path to look for\n * @param {string} availablePaths - String containing available paths\n * @returns {Promise<string>} - Formatted string with suggestions\n */\nasync function findNearestDirectory(product, docPath, availablePaths) {\n  if (!docsBaseDirs[product]) {\n    throw new Error(`Invalid product: ${product}. Must be: sf`)\n  }\n\n  const normalizedPath = normalizeDocPath(product, docPath)\n  const { isWithinBase } = resolvePathInBase(\n    docsBaseDirs[product],","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/serverless/serverless/blob/b9d7ea51c8cce57cff1207964b9b71123673081f/packages/mcp/src/tools/docs.js#L95-L131","documentation":"Error \"Path not found: ${product}/${docPath}\" thrown in serverless/serverless.","triggerScenarios":"Thrown at packages/mcp/src/tools/docs.js:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the requested documentation path exists; list available docs for the product to find a valid path."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b9d7ea51c8cce57cff1207964b9b71123673081f","analyzedAt":"2026-08-13T04:14:40.386Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}