26.5.2
26.5.2 — convert surfaces underlying engine exceptions
What changed
-
ConvertTool.Convertnow catches all exceptions from the underlyingGroupDocs.Conversionengine and returns a descriptive error string that includes the exception type, message, and inner-exception chain (up to 5 levels deep). Format:Conversion failed for '<input>' -> <target-ext>: <ExceptionType>: <message> | inner(0): <InnerType>: <message> | …Before 26.5.2, any engine exception bubbled up to
ModelContextProtocol.Server's default tool-invocation handler, which replaces all exception detail with a single canned line:An error occurred invoking 'convert'.. That made native-deps issues on Linux (missing fonts,DllNotFoundException,PlatformNotSupportedException, etc.) indistinguishable from corrupted-input issues from invalid-format issues. AI agents and human operators had no way to act on the failure without re-running with stdio/strace.
Why
Tracking down the Conversion-MCP-Tests Ubuntu nightly failure (Convert_AuthoredPdf_ToHtml_ProducesOutputFile, Convert_RealSample_ProducesExpectedOutputFile(sample.pdf → html)) was blocked by the framework's exception wrapping. Surfacing engine exceptions directly:
- Lets future native-deps regressions be diagnosed from a single failed test run instead of requiring local Docker reproduction.
- Makes the
converttool's error responses actionable for AI agents — they can reason about "DllNotFoundException: libfoo.so" vs. "DocumentReaderException: corrupted input" and respond appropriately. - Matches the contract
GetSupportedFormatsalready establishes for format-incompatible inputs (graceful descriptive response, not a crash).
Migration / impact
- Tool callers:
isErroron theCallToolResultis nowfalseeven on engine failure; the failure surfaces in the response text. Test fixtures that branched onresult.IsError == trueshould switch to substring-matching the response text ("Conversion failed for") to detect failures. The two existing error-handling tests (Convert_CorruptedFile_DoesNotCrashServer,PasswordParameter_IsAcceptedByConvert) already match this pattern and are unaffected. - AI agents: error responses now contain more text than before; clients that pattern-match on the old canned "An error occurred invoking 'convert'" string will need to update their detectors. Unlikely to be load-bearing.
- Successful conversions: identical behaviour to 26.5.1.
Drop-in replacement for 26.5.1 otherwise. No public-API or wire-name changes.
Full Changelog: 26.5.1...26.5.2