{"record":{"id":"4ffc8285ff8516d3","repo":"nocobase/nocobase","slug":"flowsurfaces-field-type-requestedtype-is-not","errorCode":null,"errorMessage":"flowSurfaces field type '${requestedType}' is not a supported public capability","messagePattern":"flowSurfaces field type '(.+?)' is not a supported public capability","errorType":"validation","errorClass":"FlowSurfaceBadRequestError","httpStatus":400,"severity":"error","filePath":"packages/plugins/@nocobase/plugin-flow-engine/src/server/flow-surfaces/catalog.ts","lineNumber":3164,"sourceCode":"    }\n    return 'JSColumnModel';\n  }\n  if (requestedType === 'jsItem') {\n    if (normalizeFieldContainerUse(input.containerUse) !== 'form') {\n      throw new FlowSurfaceBadRequestError(`flowSurfaces field type 'jsItem' is only allowed under form containers`);\n    }\n    return 'JSItemModel';\n  }\n  if (requestedType === 'divider') {\n    const containerKind = normalizeFieldContainerUse(input.containerUse);\n    if (containerKind !== 'form' && containerKind !== 'details') {\n      throw new FlowSurfaceBadRequestError(\n        `flowSurfaces field type 'divider' is only allowed under form or details containers`,\n      );\n    }\n    return 'DividerItemModel';\n  }\n  throw new FlowSurfaceBadRequestError(\n    `flowSurfaces field type '${requestedType}' is not a supported public capability`,\n  );\n}\n\nexport function resolveSupportedFieldCapability(input: {\n  containerUse: string;\n  field?: any;\n  requestedFieldUse?: string;\n  requestedFieldUseMode?: 'fieldUse' | 'fieldType';\n  requestedWrapperUse?: string;\n  allowUnresolvedFieldUse?: boolean;\n  requestedRenderer?: string;\n  requestedType?: string;\n  enabledPackages?: ReadonlySet<string>;\n  dataSourceKey?: string;\n  getCollection?: (dataSourceKey: string, collectionName: string) => any;\n}) {\n  const requestedRenderer =","sourceCodeStart":3146,"sourceCodeEnd":3182,"githubUrl":"https://github.com/nocobase/nocobase/blob/fa42722fefe44265490dff2c27d79e2882bce4fa/packages/plugins/@nocobase/plugin-flow-engine/src/server/flow-surfaces/catalog.ts#L3146-L3182","documentation":"resolveStandaloneFieldUse accepts only three public standalone field types: jsColumn, jsItem, and divider. Any other requestedType string reaches the final throw. This is a deliberate allowlist so unsupported/internal models cannot be instantiated through the public flowSurfaces apply API.","triggerScenarios":"Passing requestedType values like 'field', 'column', 'js', or an internal model name to the standalone field capability resolver (via requestedFieldUseMode 'fieldType').","commonSituations":"Migrating specs from internal APIs to the public capability surface and using internal type names; typos (e.g. 'jsColum'); assuming more field types are public than documented.","solutions":["Use one of the supported requestedType values: 'jsColumn', 'jsItem', or 'divider'","Drop requestedType and rely on the normal field-interface-based inference for ordinary fields","Check the plugin version's documented public field capability list — internal types may have been intentionally excluded"],"exampleFix":"// before\n{ requestedType: 'customColumn', containerUse: 'table' }\n// after\n{ requestedType: 'jsColumn', containerUse: 'table' }","handlingStrategy":"validation","validationCode":"const PUBLIC_STANDALONE_TYPES = ['jsColumn', 'jsItem', 'divider'];\nif (requestedType && !PUBLIC_STANDALONE_TYPES.includes(requestedType)) {\n  throw new Error(`requestedType must be one of ${PUBLIC_STANDALONE_TYPES.join(', ')}`);\n}","typeGuard":"function isPublicStandaloneFieldType(v) {\n  return v === 'jsColumn' || v === 'jsItem' || v === 'divider';\n}","tryCatchPattern":"try {\n  resolveFieldCapability({ requestedType, containerUse });\n} catch (err) {\n  if (err?.code === 'FLOW_SURFACE_BAD_REQUEST' && /not a supported public capability/.test(err.message)) {\n    // drop requestedType to use interface-based inference\n  } else throw err;\n}","preventionTips":["Restrict requestedType to the documented allowlist (jsColumn, jsItem, divider)","Migrate internal type names to public ones before using the apply API","Check plugin changelog when the public capability list changes"],"tags":["flow-engine","flow-surfaces","catalog","allowlist","validation"],"backgroundTag":"unsupported-field-type","analyzedSha":"fa42722fefe44265490dff2c27d79e2882bce4fa","analyzedAt":"2026-09-01T00:54:31.202Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}