Skip to content

26.5.2

Choose a tag to compare

@github-actions github-actions released this 14 May 12:47

26.5.2 — convert surfaces underlying engine exceptions

What changed

  • ConvertTool.Convert now catches all exceptions from the underlying GroupDocs.Conversion engine 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:

  1. Lets future native-deps regressions be diagnosed from a single failed test run instead of requiring local Docker reproduction.
  2. Makes the convert tool's error responses actionable for AI agents — they can reason about "DllNotFoundException: libfoo.so" vs. "DocumentReaderException: corrupted input" and respond appropriately.
  3. Matches the contract GetSupportedFormats already establishes for format-incompatible inputs (graceful descriptive response, not a crash).

Migration / impact

  • Tool callers: isError on the CallToolResult is now false even on engine failure; the failure surfaces in the response text. Test fixtures that branched on result.IsError == true should 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