{"record":{"id":"71fc9117c3cf0072","repo":"nocobase/nocobase","slug":"flow-surface-bad-request-71fc91","errorCode":"FLOW_SURFACE_BAD_REQUEST","errorMessage":"flowSurfaces field container '${containerUse}' is not supported","messagePattern":"flowSurfaces field container '(.+?)' is not supported","errorType":"exception","errorClass":"FlowSurfaceBadRequestError","httpStatus":400,"severity":"error","filePath":"packages/plugins/@nocobase/plugin-flow-engine/src/server/flow-surfaces/catalog.ts","lineNumber":3120,"sourceCode":"  if (\n    shouldUseAssociationTitleTextDisplay({\n      containerUse,\n      fieldInterface,\n    })\n  ) {\n    return 'DisplayTextFieldModel';\n  }\n  switch (normalizeFieldContainerUse(containerUse)) {\n    case 'filter-form':\n      return inferFilterFieldUse(fieldInterface);\n    case 'form':\n      return inferEditableFieldUse(fieldInterface);\n    case 'details':\n      return inferDisplayFieldUse(fieldInterface);\n    case 'table':\n      return inferDisplayFieldUse(fieldInterface);\n    default:\n      throw new FlowSurfaceBadRequestError(`flowSurfaces field container '${containerUse}' is not supported`);\n  }\n}\n\nfunction inferJsFieldUseByContainer(containerUse?: string) {\n  switch (normalizeFieldContainerUse(containerUse)) {\n    case 'form':\n      return 'JSEditableFieldModel';\n    case 'details':\n    case 'table':\n      return 'JSFieldModel';\n    case 'filter-form':\n      throw new FlowSurfaceBadRequestError(`flowSurfaces field renderer 'js' is not allowed under '${containerUse}'`);\n    default:\n      throw new FlowSurfaceBadRequestError(`flowSurfaces field container '${containerUse}' is not supported`);\n  }\n}\n\nfunction resolveStandaloneFieldUse(input: { requestedType?: string; containerUse?: string }) {","sourceCodeStart":3102,"sourceCodeEnd":3138,"githubUrl":"https://github.com/nocobase/nocobase/blob/fa42722fefe44265490dff2c27d79e2882bce4fa/packages/plugins/@nocobase/plugin-flow-engine/src/server/flow-surfaces/catalog.ts#L3102-L3138","documentation":"While inferring a field's model 'use' from its interface, the field container kind (form, details, table, filter-form) is looked up in a switch; any containerUse outside these supported kinds reaches the default branch and throws. The library only supports field rendering inside those four container types.","triggerScenarios":"Resolving a field capability with a containerUse that is empty/garbled or not one of 'form' | 'details' | 'table' | 'filter-form' — e.g. a typo like 'forms' or 'grid', or a container node whose use is an unsupported model type.","commonSituations":"Typos in hand-written surface specs; custom container models that aren't yet mapped; passing the raw block uid instead of the container use; older specs written for a version with different container vocabulary.","solutions":["Set containerUse to one of the supported values: 'form', 'details', 'table', or 'filter-form'","Check for typos/pluralization in the container use string","Place the field inside a supported container node instead of an unsupported custom container"],"exampleFix":"// before\nresolveSupportedFieldCapability({ containerUse: 'forms' })\n// after\nresolveSupportedFieldCapability({ containerUse: 'form' })","handlingStrategy":"validation","validationCode":"const SUPPORTED_FIELD_CONTAINERS = ['form', 'details', 'table', 'filter-form'];\nif (!SUPPORTED_FIELD_CONTAINERS.includes(containerUse)) {\n  throw new Error(`containerUse must be one of ${SUPPORTED_FIELD_CONTAINERS.join(', ')}`);\n}","typeGuard":"function isSupportedFieldContainer(v) {\n  return v === 'form' || v === 'details' || v === 'table' || v === 'filter-form';\n}","tryCatchPattern":"try {\n  resolveFieldCapability({ containerUse });\n} catch (err) {\n  if (err?.code === 'FLOW_SURFACE_BAD_REQUEST' && /field container .* is not supported/.test(err.message)) {\n    // fall back to 'form' or surface a validation message to the user\n  } else throw err;\n}","preventionTips":["Validate containerUse against the known enum before calling the API","Avoid free-text container names; derive containerUse from the parent node's use","Check spelling/pluralization in hand-edited specs"],"tags":["flow-engine","flow-surfaces","catalog","validation"],"backgroundTag":"unsupported-container-type","analyzedSha":"fa42722fefe44265490dff2c27d79e2882bce4fa","analyzedAt":"2026-09-01T00:54:31.202Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}