{"record":{"id":"cd068515bdb0713f","repo":"hcengineering/platform","slug":"unsupported-type-property-type-currentpath","errorCode":null,"errorMessage":"Unsupported type: ${property.type} ${currentPath}","messagePattern":"Unsupported type: (.+?) (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/importer/src/huly/cards.ts","lineNumber":495,"sourceCode":"              of: baseType\n            }\n          : baseType\n    } else {\n      switch (property.type) {\n        case 'TypeString':\n          type._class = core.class.TypeString\n          type.label = core.string.String\n          break\n        case 'TypeNumber':\n          type._class = core.class.TypeNumber\n          type.label = core.string.Number\n          break\n        case 'TypeBoolean':\n          type._class = core.class.TypeBoolean\n          type.label = core.string.Boolean\n          break\n        default:\n          throw new Error('Unsupported type: ' + property.type + ' ' + currentPath)\n      }\n    }\n    return type\n  }\n\n  private async createCardWithRelations (\n    cardHeader: Record<string, any>,\n    cardPath: string,\n    masterTagId: Ref<MasterTag>,\n    masterTagAssociaions: Map<string, AssociationMetadata>,\n    masterTagAttributes: Map<string, UnifiedDoc<Attribute<MasterTag>>>,\n    blobFiles: Map<string, UnifiedFile>,\n    parentCardId?: Ref<Card>\n  ): Promise<UnifiedDoc<Doc>[]> {\n    const { _class, title, blobs: rawBlobs, tags: rawTags, ...customProperties } = cardHeader\n    const tags = rawTags !== undefined ? (Array.isArray(rawTags) ? rawTags : [rawTags]) : []\n\n    const tagAttributes = new Map<string, UnifiedDoc<Attribute<Tag>>>()","sourceCodeStart":477,"sourceCodeEnd":513,"githubUrl":"https://github.com/hcengineering/platform/blob/63e28dc96483967b2fc21c881b3f1023c1de7718/packages/importer/src/huly/cards.ts#L477-L513","documentation":"Thrown by CardsProcessor.convertPropertyType when a card property declares a type name that has no mapping to a core Huly type. The switch handles a fixed set (e.g. TypeBoolean, TypeString, etc.); any unrecognized string — typo, unsupported type, or type from another plugin — lands in the default case.","triggerScenarios":"Declaring a custom property in a card/master-tag YAML with `type:` set to an unmapped name (e.g. `TypeDatetime` when only `TypeTimestamp` is supported, or a custom plugin type) while processing via the `type` flow.","commonSituations":"Copy-pasting type names from other Huly plugins; inventing intuitive names not in the importer's mapping table; importer version that lacks a newly introduced core type.","solutions":["Replace the property `type:` value with one supported by the importer's switch (e.g. TypeString, TypeBoolean, TypeNumber, etc.).","Check the importer source for the exact set of supported type case labels and use one verbatim.","If the type genuinely doesn't exist, add a case to convertPropertyType mapping it to the appropriate core class."],"exampleFix":"# before\nproperties:\n  deadline:\n    type: TypeDatetime\n# after\nproperties:\n  deadline:\n    type: TypeTimestamp","handlingStrategy":"validation","validationCode":"const SUPPORTED_PROPERTY_TYPES = ['TypeString', 'TypeNumber', 'TypeBoolean', 'TypeTimestamp', 'TypeRef'] // match importer's switch\nfunction validatePropertyTypes(def: { properties: Record<string, { type: string }> }): string[] {\n  return Object.entries(def.properties)\n    .filter(([, p]) => !SUPPORTED_PROPERTY_TYPES.includes(p.type))\n    .map(([k]) => k)\n}","typeGuard":"function isSupportedPropertyType(t: string): t is 'TypeString' | 'TypeNumber' | 'TypeBoolean' | 'TypeTimestamp' {\n  return ['TypeString', 'TypeNumber', 'TypeBoolean', 'TypeTimestamp'].includes(t)\n}","tryCatchPattern":"try {\n  await processor.type(propDef, currentPath)\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Unsupported type:')) {\n    const badType = e.message.split(' ')[2]\n    console.error(`Property type '${badType}' is not mapped — use one of the importer's supported type names`)\n  } else throw e\n}","preventionTips":["Keep a documented list of supported property type names for your importer version.","Validate card YAML property types in CI before import.","Don't invent type names — check the importer's switch statement for exact labels."],"tags":["importer","type-mapping","validation"],"backgroundTag":"unsupported-type-mapping","analyzedSha":"63e28dc96483967b2fc21c881b3f1023c1de7718","analyzedAt":"2026-08-29T15:21:27.377Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}