{"record":{"id":"9999a8ed0043754a","repo":"Budibase/budibase","slug":"unrecognized-table-type-type","errorCode":null,"errorMessage":"Unrecognized table type ${type}","messagePattern":"Unrecognized table type (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/builder/src/templates/screenTemplating/table/index.ts","lineNumber":46,"sourceCode":"  if (type === \"sidePanel\") {\n    return await sidePanel({\n      tableOrView,\n      permissions,\n      screens,\n      workspaceAppId,\n    })\n  }\n\n  if (type === \"newScreen\") {\n    return await newScreen({\n      tableOrView,\n      permissions,\n      screens,\n      workspaceAppId,\n    })\n  }\n\n  throw new Error(`Unrecognized table type ${type}`)\n}\n\nexport default createScreen\n","sourceCodeStart":28,"sourceCodeEnd":50,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/builder/src/templates/screenTemplating/table/index.ts#L28-L50","documentation":"createScreen is the dispatcher for Budibase's table-detail screen templates. It accepts a `type` string that must be one of \"inline\", \"modal\", \"sidePanel\", or \"newScreen\", and routes to the matching template builder. If the type matches none of these branches, it throws this error because there is no template to generate.","triggerScenarios":"Calling createScreen({ type }) with a type string other than the four supported values (e.g. a typo like \"new-screen\", an old removed value like \"table\", or an undefined/null type passed from UI code that failed to resolve the user's selection).","commonSituations":"Custom/patched builder code passing a new screen-layout option that the template layer doesn't know; version drift where a UI component emits a type added in a newer builder but the template module is older; a stale persisted user preference containing a removed layout value.","solutions":["Check the `type` argument at the call site and make sure it is exactly one of \"inline\", \"modal\", \"sidePanel\", or \"newScreen\"","Log or inspect the incoming value for undefined/null or casing differences (values are lowercase, exact match)","If you added a new layout type, add a corresponding if-branch in packages/builder/src/templates/screenTemplating/table/index.ts routing to a template builder","Clear any stale stored layout preference in the builder UI so it re-resolves a supported type"],"exampleFix":"// before\nawait createScreen({ tableOrView, type: \"new-screen\", ... })\n// after\nawait createScreen({ tableOrView, type: \"newScreen\", ... })","handlingStrategy":"validation","validationCode":"const TABLE_SCREEN_TYPES = [\"inline\", \"modal\", \"sidePanel\", \"newScreen\"] as const\nfunction validateScreenType(type: string) {\n  if (!TABLE_SCREEN_TYPES.includes(type as (typeof TABLE_SCREEN_TYPES)[number])) {\n    throw new Error(`type must be one of: ${TABLE_SCREEN_TYPES.join(\", \")}`)\n  }\n}","typeGuard":"function isTableScreenType(type: string): type is \"inline\" | \"modal\" | \"sidePanel\" | \"newScreen\" {\n  return [\"inline\", \"modal\", \"sidePanel\", \"newScreen\"].includes(type)\n}","tryCatchPattern":"try {\n  await createScreen({ tableOrView, type, permissions, screens, workspaceAppId })\n} catch (err) {\n  if ((err as Error).message.startsWith(\"Unrecognized table type\")) {\n    console.error(`Bad screen type \"${type}\"; falling back to \"newScreen\"`)\n    return createScreen({ tableOrView, type: \"newScreen\", permissions, screens, workspaceAppId })\n  }\n  throw err\n}","preventionTips":["Type the `type` param as a union (\"inline\" | \"modal\" | \"sidePanel\" | \"newScreen\") instead of string","Never persist raw layout selections; re-validate stored preferences against the supported list","Keep UI option values and the template dispatcher in sync via a shared constant/type","Log the incoming type when it reaches createScreen to catch casing/undefined issues early"],"tags":["builder","screens","invalid-argument"],"backgroundTag":"invalid-enum-value","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}