{"record":{"id":"04a1e320774ed837","repo":"iOfficeAI/OfficeCLI","slug":"exporter-not-found","errorCode":"exporter_not_found","errorMessage":"No exporter plugin found for {sourceExt} → {targetExt}.","messagePattern":"No exporter plugin found for (.+?) → (.+?)\\.","errorType":"exception","errorClass":"CliException","httpStatus":null,"severity":"error","filePath":"src/officecli/Core/Plugins/ExporterInvoker.cs","lineNumber":34,"sourceCode":"{\n    public sealed record ExportResult(string OutputPath, ResolvedPlugin Plugin, bool ResidentClosed);\n\n    /// <summary>\n    /// Resolve an exporter for (sourceExt, targetExt) and run it. On success,\n    /// the target file exists at <paramref name=\"outPath\"/> and the result\n    /// reports which plugin handled it. On failure, throws CliException with\n    /// an appropriate code (exporter_not_found, plugin_failed, ...).\n    ///\n    /// If a resident is holding the source file, it's closed first to release\n    /// the exclusive lock; <see cref=\"ExportResult.ResidentClosed\"/> indicates\n    /// this happened so the caller can surface it to the user.\n    /// </summary>\n    public static ExportResult Run(string sourceFullPath, string targetExt, string outPath)\n    {\n        var sourceExt = Path.GetExtension(sourceFullPath).ToLowerInvariant();\n\n        var plugin = Resolve(sourceExt, targetExt)\n            ?? throw new CliException($\"No exporter plugin found for {sourceExt} → {targetExt}.\")\n            {\n                Code = \"exporter_not_found\",\n                Suggestion = \"Install an exporter plugin: `officecli plugins list` to see what's available, or see plugins/plugin-protocol.md.\",\n            };\n\n        bool residentClosed = false;\n        if (ResidentClient.TryConnect(sourceFullPath, out _))\n        {\n            if (ResidentClient.SendCloseWithResponse(sourceFullPath, out _))\n                residentClosed = true;\n        }\n\n        var idle = plugin.Manifest.ResolveIdleTimeout(\"export\");\n        var result = PluginProcess.Run(new PluginProcess.RunOptions\n        {\n            ExecutablePath = plugin.ExecutablePath,\n            Arguments = new[] { \"export\", sourceFullPath, \"--out\", outPath },\n            IdleTimeoutSeconds = idle,","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/iOfficeAI/OfficeCLI/blob/1ced45e900782c5083ed550ddf328ee974e425e7/src/officecli/Core/Plugins/ExporterInvoker.cs#L16-L52","documentation":"CliException (code 'exporter_not_found') thrown when ExporterInvoker.Resolve(sourceExt, targetExt) returns null — no exporter plugin declares the requested source→target extension pair. Resolve indexes plugins by target extension and filters by the manifest's supports list (a missing supports is treated as accept-all for native sources).","triggerScenarios":"Export invoked with a (source, target) pair no installed exporter covers, e.g. exporting .docx to .pdf without a pdf exporter plugin installed.","commonSituations":"Target extension not in any plugin's extensions field; plugin present but its supports list excludes the source; plugin uninstalled or install path broken.","solutions":["Run `officecli plugins list` to see installed exporters and their declared extensions.","Install an exporter plugin covering the source→target pair.","Verify the plugin manifest's extensions array lists the target ext and supports lists the source ext."],"exampleFix":"// before: export to pdf with no pdf exporter\nofficecli export report.docx --out report.pdf\n\n// after\nofficecli plugins install pdf-exporter\nofficecli export report.docx --out report.pdf","handlingStrategy":"validation","validationCode":"var src = Path.GetExtension(sourcePath).ToLowerInvariant();\nvar tgt = targetExt.TrimStart('.').ToLowerInvariant();\nif (ExporterInvoker.Resolve(src, tgt) is null)\n    throw new InvalidOperationException($\"No exporter for {src} → .{tgt}; install one.\");","typeGuard":null,"tryCatchPattern":"try { ExporterInvoker.Run(source, targetExt, outPath); }\ncatch (CliException ex) when (ex.Code == \"exporter_not_found\")\n{ /* prompt user to install an exporter for the pair */ }","preventionTips":["Validate the (source,target) pair is supported before queuing exports.","Document required exporter plugins per target format.","Surface the install hint suggestion text to end users."],"tags":["plugins","exporter","not-found","cli-exception"],"backgroundTag":null,"analyzedSha":"1ced45e900782c5083ed550ddf328ee974e425e7","analyzedAt":"2026-08-13T13:01:07.193Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}