Budibase/budibase · error · HTTPError

Project ids must be an array.

Error message

Project ids must be an array.

What it means

Error "Project ids must be an array." thrown in Budibase/budibase.

Source

Thrown at packages/server/src/utilities/projects.ts:10

import { features, HTTPError } from "@budibase/backend-core"
import { DocumentType, FeatureFlag, prefixed } from "@budibase/types"
import sdk from "../sdk"

const validateProjectIds = (projectIds?: string[] | null) => {
  if (projectIds === undefined) {
    return undefined
  }
  if (projectIds === null) {
    throw new HTTPError("Project ids must be an array.", 400)
  }

  if (!Array.isArray(projectIds)) {
    throw new HTTPError("Project ids must be an array.", 400)
  }

  return projectIds.map(projectId => {
    if (typeof projectId !== "string" || !projectId.trim()) {
      throw new HTTPError("Project ids must be non-empty strings.", 400)
    }
    const trimmed = projectId.trim()
    if (!trimmed.startsWith(prefixed(DocumentType.PROJECT))) {
      throw new HTTPError(`Project '${trimmed}' not found.`, 404)
    }
    return trimmed
  })
}

View on GitHub (pinned to a81a902e9a)

When it happens

Trigger: Thrown at packages/server/src/utilities/projects.ts:10 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/0fed4165c977a1d0. Report an issue: GitHub.