Claus Ibsen created CAMEL-26212:
-----------------------------------

             Summary: 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
             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)

Reply via email to