{"record":{"id":"dc377cd3ac014d65","repo":"Budibase/budibase","slug":"id-id-is-not-valid-for-the-subtype-user","errorCode":null,"errorMessage":"Id \"${id}\" is not valid for the subtype \"USER\"","messagePattern":"Id \"(.+?)\" is not valid for the subtype \"USER\"","errorType":"validation","errorClass":"InvalidBBRefError","httpStatus":null,"severity":"error","filePath":"packages/server/src/utilities/rowProcessor/bbReferenceProcessor.ts","lineNumber":46,"sourceCode":"\n  if (!id) {\n    return null\n  }\n\n  switch (subtype) {\n    case BBReferenceFieldSubType.USER: {\n      if (id.startsWith(ROW_PREFIX)) {\n        id = dbCore.getGlobalIDFromUserMetadataID(id)\n      }\n\n      try {\n        await cache.user.getUser({\n          userId: id,\n        })\n        return id\n      } catch (e: any) {\n        if (e.statusCode === 404) {\n          throw new InvalidBBRefError(id, BBReferenceFieldSubType.USER)\n        }\n        throw e\n      }\n    }\n\n    default:\n      throw utils.unreachable(subtype)\n  }\n}\nexport async function processInputBBReferences(\n  value: string | string[] | { _id: string }[],\n  subtype: BBReferenceFieldSubType\n): Promise<string[] | null> {\n  if (!value || !value[0]) {\n    return null\n  }\n\n  let referenceIds","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/utilities/rowProcessor/bbReferenceProcessor.ts#L28-L64","documentation":"Error \"Id \"${id}\" is not valid for the subtype \"USER\"\" thrown in Budibase/budibase.","triggerScenarios":"Thrown at packages/server/src/utilities/rowProcessor/bbReferenceProcessor.ts:46 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"}