Budibase/budibase · error · HTTPError
Project ids must be non-empty strings.
Error message
Project ids must be non-empty strings.
What it means
Error "Project ids must be non-empty strings." thrown in Budibase/budibase.
Source
Thrown at packages/server/src/utilities/projects.ts:19
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
})
}
const dedupeProjectIds = (projectIds: string[]) => {
const deduped = Array.from(new Set(projectIds))
return deduped.length ? deduped : undefined
}
export const resolveProjectIds = async (projectIds?: string[] | null) => {
const validated = validateProjectIds(projectIds)
if (!validated?.length) {
return undefinedView on GitHub (pinned to a81a902e9a)
When it happens
Trigger: Thrown at packages/server/src/utilities/projects.ts:19 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/137091b1853af6af.
Report an issue: GitHub.