davsclaus opened a new pull request, #28152: URL: https://github.com/apache/camel/pull/28152
https://issues.apache.org/jira/browse/CAMEL-25871 Two Simple OGNL errors gave no hint, and a coding agent got stuck on both in a night of runs against a local model: 1. **`${body.orderId}` on a List** (an unmarshalled JSON array). The error was "Method with name: orderId not found on bean: [...] of type: java.util.ArrayList". The agent then made up methods (`${body.find(...)}`, `${body.?[...]}`) and got the same error. Now the message adds: "(a List has no method or key orderId: pick an element first, such as [0].orderId, or the element whose orderId has a given value with jsonpath, such as `jsonpath: "$[?(@.orderId == '${header.orderId}')]"` with resultType java.util.Map, or split it)". `${body[orderId]}` on a List already had a hint (CAMEL-25746). 2. **`${variable.customer[name]}` on a variable that holds a file.** pollEnrich with variableReceive puts the polled `GenericFile` in the variable. The error was "Key: name not found in bean: GenericFile[C-482.json]", with no hint. Now it says to unmarshal the file first, in place with variableSend and variableReceive. The same read on the body already said this (CAMEL-25749). Tests: three new tests in SimpleSyntaxHintsTest. camel-core simple, bean language and bean component tests (850) pass, and camel-bean tests (9) pass. _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m -- 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]
