{"record":{"id":"0fed4165c977a1d0","repo":"Budibase/budibase","slug":"project-ids-must-be-an-array","errorCode":null,"errorMessage":"Project ids must be an array.","messagePattern":"Project ids must be an array\\.","errorType":"http","errorClass":"HTTPError","httpStatus":400,"severity":"error","filePath":"packages/server/src/utilities/projects.ts","lineNumber":10,"sourceCode":"import { features, HTTPError } from \"@budibase/backend-core\"\nimport { DocumentType, FeatureFlag, prefixed } from \"@budibase/types\"\nimport sdk from \"../sdk\"\n\nconst validateProjectIds = (projectIds?: string[] | null) => {\n  if (projectIds === undefined) {\n    return undefined\n  }\n  if (projectIds === null) {\n    throw new HTTPError(\"Project ids must be an array.\", 400)\n  }\n\n  if (!Array.isArray(projectIds)) {\n    throw new HTTPError(\"Project ids must be an array.\", 400)\n  }\n\n  return projectIds.map(projectId => {\n    if (typeof projectId !== \"string\" || !projectId.trim()) {\n      throw new HTTPError(\"Project ids must be non-empty strings.\", 400)\n    }\n    const trimmed = projectId.trim()\n    if (!trimmed.startsWith(prefixed(DocumentType.PROJECT))) {\n      throw new HTTPError(`Project '${trimmed}' not found.`, 404)\n    }\n    return trimmed\n  })\n}\n","sourceCodeStart":1,"sourceCodeEnd":28,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/utilities/projects.ts#L1-L28","documentation":"Error \"Project ids must be an array.\" thrown in Budibase/budibase.","triggerScenarios":"Thrown at packages/server/src/utilities/projects.ts:10 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"}