Budibase/budibase · error · HTTPError

Invalid default value for field '${key}' - ${err.message}

Error message

Invalid default value for field '${key}' - ${err.message}

What it means

Error "Invalid default value for field '${key}' - ${err.message}" thrown in Budibase/budibase.

Source

Thrown at packages/server/src/utilities/rowProcessor/index.ts:184

    const isEmpty =
      row[key] == null ||
      row[key] === "" ||
      (Array.isArray(row[key]) && row[key].length === 0)

    if ("default" in schema && schema.default != null && isEmpty) {
      let processed: string | string[]
      if (Array.isArray(schema.default)) {
        processed = schema.default.map(val => processStringSync(val, ctx))
      } else if (typeof schema.default === "string") {
        processed = processStringSync(schema.default, ctx)
      } else {
        processed = schema.default
      }

      try {
        row[key] = coerce(processed, schema.type)
      } catch (err: any) {
        throw new HTTPError(
          `Invalid default value for field '${key}' - ${err.message}`,
          400
        )
      }
    }
  }
}

/**
 * This will coerce a value to the correct types based on the type transform map
 * @param value The value to coerce
 * @param type The type fo coerce to
 * @returns The coerced value
 */
export function coerce(value: string | Date | string[], type: FieldType) {
  // no coercion specified for type, skip it
  if (!TYPE_TRANSFORM_MAP[type]) {
    return value

View on GitHub (pinned to a81a902e9a)

When it happens

Trigger: Thrown at packages/server/src/utilities/rowProcessor/index.ts:184 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/8a72fa6acfc2b581. Report an issue: GitHub.