Budibase/budibase · error · InvalidBBRefError

Id "${JSON.stringify(value)}" is not valid for the subtype "

Error message

Id "${JSON.stringify(value)}" is not valid for the subtype "USER"

What it means

Error "Id "${JSON.stringify(value)}" is not valid for the subtype "USER"" thrown in Budibase/budibase.

Source

Thrown at packages/server/src/utilities/rowProcessor/bbReferenceProcessor.ts:20

import { utils } from "@budibase/shared-core"
import {
  BBReferenceFieldSubType,
  DocumentType,
  SEPARATOR,
  User,
} from "@budibase/types"
import { getUserFullName } from "../users"
import { InvalidBBRefError } from "./errors"

const ROW_PREFIX = DocumentType.ROW + SEPARATOR

export async function processInputBBReference(
  value: string | { _id: string },
  subtype: BBReferenceFieldSubType.USER
): Promise<string | null> {
  if (value && Array.isArray(value)) {
    if (value.length > 1) {
      throw new InvalidBBRefError(
        JSON.stringify(value),
        BBReferenceFieldSubType.USER
      )
    }
    value = value[0]
  }
  let id = typeof value === "string" ? value : value?._id

  if (!id) {
    return null
  }

  switch (subtype) {
    case BBReferenceFieldSubType.USER: {
      if (id.startsWith(ROW_PREFIX)) {
        id = dbCore.getGlobalIDFromUserMetadataID(id)
      }

View on GitHub (pinned to a81a902e9a)

When it happens

Trigger: Thrown at packages/server/src/utilities/rowProcessor/bbReferenceProcessor.ts:20 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/0d7eb4dea7f9abe3. Report an issue: GitHub.