Repository navigation
CAMEL-25746: camel-bean - the error for a key read from a stream, JSON text or a List says what to do - #28042
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
gnodet-bot
left a comment
There was a problem hiding this comment.
Clean improvement — two focused static helper methods that add actionable diagnostic hints to existing exceptions on error paths only. No change to success paths. Well-tested and the hints will genuinely help users (and LLM agents) understand what went wrong and what to do about it.
One minor inconsistency worth fixing:
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 490 of 706 tested, 27 compile-only — current: 492 all testedMaveniverse Scalpel detected 490 affected modules (current approach: 492). Skip-tests mode would test 490 modules (2 direct + 488 downstream), skip tests for 27 (generated code, meta-modules) Modules only in current approach (2)
Modules Scalpel would test (490)
Modules with tests skipped (27)
Build reactor — dependencies compiled but only changed modules were tested (2 modules, 9.4s total)Total reactor time: 9.4s
Top 20 slowest modules:
|
…ead from a stream, JSON text or a List, and for a Map or List as the HTTP response, say what to do In ten benchmark runs of a local model, 3 of the 8 failed steps of the contract-first openapi example hit errors that named the problem but not the fix: a variable set from the raw request body before the unmarshal, a key read from the whole list, and a List returned as the response. - "Key: x not found in bean" adds a hint: for a stream or bytes, unmarshal it first (a variable keeps the value it had when it was set); for JSON text, unmarshal it first; for a List, pick an element such as [0][x], or split it. - platform-http: a Map or List as the response body says to marshal it to JSON first, as the http producer says for a request body (CAMEL-25309). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
…ay or a Collection Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
…ysHint, beside the keyHint of a Map main now has Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
b962b8f to
9d52ae3
Compare
CAMEL-25746: in the overnight benchmark of Oct 17-18 (ten runs of a local model on the example ladder), 3 of the 8 failed steps of the contract-first openapi example hit errors that name the problem but not the fix. A model reads these errors and tries again, so the fix in the message matters, as it does for people.
What
BeanExpression, which Simple uses for${body[x]}and${variable.v[x]}) adds a hint after the message:unmarshal, and the step answered 500.{or[): "unmarshal it first". Other text keeps the message as it was.VertxPlatformHttpMapResponseTest.Tests
SimpleTest: four new tests (a stream, JSON text, a List, an array). The existing exact-message tests for plain text pass unchanged. 210 tests.noKeysHint, beside thekeyHintfor a Map without the key that main now has.SimpleTestpasses again (210 tests).🤖 Generated with Claude Code
https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m