{"record":{"id":"b32ec2457993c516","repo":"Budibase/budibase","slug":"generated-sharepoint-list-csv-exceeds-the-100-mb-k","errorCode":null,"errorMessage":"Generated SharePoint list CSV exceeds the 100 MB knowledge file limit","messagePattern":"Generated SharePoint list CSV exceeds the 100 MB knowledge file limit","errorType":"http","errorClass":"HTTPError","httpStatus":400,"severity":"error","filePath":"packages/server/src/sdk/workspace/ai/knowledgeSources/sharepoint/connection.ts","lineNumber":655,"sourceCode":"      )\n      .map(column => ({\n        name: column.name,\n        displayName: column.displayName,\n      }))\n      .sort((a, b) => a.name.localeCompare(b.name))\n  )\n\n  const chunks: Uint8Array<ArrayBuffer>[] = []\n  let totalBytes = 0\n  let itemCount = 0\n  let isFirstRow = true\n\n  const appendCsvRow = (row: unknown[]) => {\n    const line = `${isFirstRow ? \"\" : \"\\n\"}${buildCsvRow(row)}`\n    const chunk = Buffer.from(line, \"utf8\")\n    const nextTotalBytes = totalBytes + chunk.byteLength\n    if (nextTotalBytes > maxSizeBytes) {\n      throw new HTTPError(\n        \"Generated SharePoint list CSV exceeds the 100 MB knowledge file limit\",\n        400\n      )\n    }\n    chunks.push(chunk as Uint8Array<ArrayBuffer>)\n    totalBytes = nextTotalBytes\n    isFirstRow = false\n  }\n\n  appendCsvRow([\n    \"SharePoint Item ID\",\n    \"Created\",\n    \"Modified\",\n    \"Web URL\",\n    ...columns.map(column => column.displayName),\n  ])\n\n  let nextLink = `${SHAREPOINT_API_BASE}/sites/${encodeURIComponent(siteId)}/lists/${encodeURIComponent(listId)}/items?$top=200&$expand=fields`","sourceCodeStart":637,"sourceCodeEnd":673,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/sdk/workspace/ai/knowledgeSources/sharepoint/connection.ts#L637-L673","documentation":"Error \"Generated SharePoint list CSV exceeds the 100 MB knowledge file limit\" thrown in Budibase/budibase.","triggerScenarios":"Thrown at packages/server/src/sdk/workspace/ai/knowledgeSources/sharepoint/connection.ts:655 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}