Budibase/budibase · error · HTTPError

Failed to list SharePoint drives (${response.status})

Error message

Failed to list SharePoint drives (${response.status})

What it means

Error "Failed to list SharePoint drives (${response.status})" thrown in Budibase/budibase.

Source

Thrown at packages/server/src/sdk/workspace/ai/knowledgeSources/sharepoint/connection.ts:461

  while (nextLink) {
    const response = await requestWithRetries(
      "listSharePointDrives",
      () =>
        fetch(nextLink, {
          signal,
          headers: {
            Authorization: bearerToken,
          },
        }),
      signal
    )
    if (!response.ok) {
      console.error("Failed to list SharePoint drives", {
        status: response.status,
        siteId,
      })
      throw new HTTPError(
        response.status === 401 || response.status === 403
          ? "Access denied by Microsoft Graph. Ensure delegated SharePoint read permissions are granted."
          : `Failed to list SharePoint drives (${response.status})`,
        400
      )
    }

    const payload = (await response.json()) as SharePointDriveListResponse
    drives.push(...(payload.value || []))
    const nextPageLink = payload["@odata.nextLink"]
    if (!nextPageLink) {
      nextLink = ""
    } else if (!isAllowedSharePointNextLink(nextPageLink)) {
      throw new HTTPError("Invalid SharePoint pagination URL", 400)
    } else {
      nextLink = nextPageLink
    }
  }

View on GitHub (pinned to a81a902e9a)

When it happens

Trigger: Thrown at packages/server/src/sdk/workspace/ai/knowledgeSources/sharepoint/connection.ts:461 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/c0e9942e0e6c03bf. Report an issue: GitHub.