[
https://issues.apache.org/jira/browse/CAMEL-26212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-26212.
---------------------------------
Resolution: Fixed
Fixed by https://github.com/apache/camel/pull/29033 (merged to main as
fce13c13dafc7763b3809a2ec526aef330a4d09c).
_Claude Code on behalf of Claus Ibsen (davsclaus)_
> camel-ai-resource - a List body with a binary mimeType fails with a
> misleading argument type mismatch error
> -----------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26212
> URL: https://issues.apache.org/jira/browse/CAMEL-26212
> Project: Camel
> Issue Type: Bug
> Components: camel-ai
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Found while adding the catalog body types of ai-resource (CAMEL-24961, PR
> #28401).
> h4. 1. A List body with a binary mimeType fails with "argument type mismatch"
> For a binary {{mimeType}}, {{AiResourceExecutor}} (main 2a465aa4814c, line
> 107) reads the reply with {{getBody(byte[].class)}}. A {{List}} body makes
> the type converter throw a {{TypeConversionException}} with "argument type
> mismatch", which escapes before the {{conversionError}} path (line 109) that
> would name the resource, the expected type and the declared mimeType. Checked
> on 4.24.0-SNAPSHOT with routes run through {{AiResourceExecutor}}.
> Proposed: catch the {{TypeConversionException}} and return the same
> {{conversionError}} as for a null result.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)