davsclaus commented on code in PR #25893:
URL: https://github.com/apache/camel/pull/25893#discussion_r3888873238


##########
components/camel-ai/camel-langchain4j-agent/src/main/java/org/apache/camel/component/langchain4j/agent/LangChain4jAgentProducer.java:
##########
@@ -185,6 +186,7 @@ public void process(Exchange exchange) throws Exception {
                     result.finishReason(),
                     null));
         } catch (RuntimeException e) {
+            GenAiErrorSupport.apply(exchange, e);

Review Comment:
   This wiring has no test coverage — unlike the 
openai/langchain4j-chat/spring-ai-chat producers, there's no 
`LangChain4jAgentErrorMetadataTest` confirming `GenAiErrorSupport.apply()` is 
actually invoked and the exchange property is set when the agent throws.



##########
components/camel-ai/camel-langchain4j-embeddings/src/main/java/org/apache/camel/component/langchain4j/embeddings/LangChain4jEmbeddingsProducer.java:
##########
@@ -60,6 +61,7 @@ public void process(Exchange exchange) throws Exception {
                     result.finishReason(),
                     null));
         } catch (RuntimeException e) {
+            GenAiErrorSupport.apply(exchange, e);

Review Comment:
   Same gap as `LangChain4jAgentProducer` — no producer-level test verifies 
this wiring end-to-end.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to