{"record":{"id":"75164a293c50d24a","repo":"semaphoreui/semaphore","slug":"type-s-not-found","errorCode":null,"errorMessage":"type %s not found","messagePattern":"type (.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"services/export/Exporter.go","lineNumber":326,"sourceCode":"\t\t}\n\t}\n\n\treturn nil\n}\n\ntype ExporterChain struct {\n\texporters map[string]TypeExporter\n\tKeyMapper\n}\n\nfunc (p *ExporterChain) getTypeExporter(name string) TypeExporter {\n\treturn p.exporters[name]\n}\n\nfunc (p *ExporterChain) getLoadedKeys(name string, scope string) ([]EntityKey, error) {\n\texporter, ok := p.exporters[name]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"type %s not found\", name)\n\t}\n\n\treturn exporter.getLoadedKeys(scope)\n}\n\nfunc (p *ExporterChain) getLoadedKeysInt(name string, scope string) ([]int, error) {\n\texporter, ok := p.exporters[name]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"type %s not found\", name)\n\t}\n\n\tkeys, err := exporter.getLoadedKeys(scope)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tout := make([]int, len(keys))\n\tfor i, v := range keys {","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/semaphoreui/semaphore/blob/1774ccb71a0a8b82eb74ea24c23ac9ab713de2fa/services/export/Exporter.go#L308-L344","documentation":"Returned by ExporterChain.getLoadedKeys in services/export/Exporter.go when the requested entity type name has no registered TypeExporter in the chain's exporters map. It is a generic lookup guard: the name string passed by the caller (e.g. 'project', 'user', a template or integration type) does not match any exporter registered on the chain, so the keys for that type cannot be enumerated.","triggerScenarios":"Calling ExporterChain.getLoadedKeys(name, scope) with a type name string that was never registered in the chain's exporters map (p.exporters[name] miss).","commonSituations":"Typo in the exporter type name; requesting keys for an entity type excluded from the current export configuration; version skew where a type was renamed between Semaphore versions.","solutions":["Use an exporter type name that is actually registered in the chain (check the chain setup/registry)","Verify spelling and casing of the name argument against the registered exporters","Update the export/import code if the entity type was renamed in a newer version"],"exampleFix":"// before\nkeys, err := chain.getLoadedKeys(\"projectt\", scope) // typo\n// after\nkeys, err := chain.getLoadedKeys(\"project\", scope)","handlingStrategy":"try-catch","validationCode":"if _, ok := chain.exporters[name]; !ok {\n    return fmt.Errorf(\"type %s is not registered\", name)\n}","typeGuard":null,"tryCatchPattern":"keys, err := chain.getLoadedKeys(name, scope)\nif err != nil {\n    if strings.HasSuffix(err.Error(), \"not found\") {\n        return nil // type not part of this export run\n    }\n    return err\n}","preventionTips":["Derive type names from a shared constant/registry, not string literals","Keep export type lists generated from the registered chain","Watch for renames when upgrading Semaphore versions"],"tags":["go","export","import","unknown-type"],"backgroundTag":"resource-not-found","analyzedSha":"1774ccb71a0a8b82eb74ea24c23ac9ab713de2fa","analyzedAt":"2026-09-07T11:00:33.293Z","contentChangedAt":"2026-09-07T11:00:33.293Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}