davsclaus opened a new pull request, #26622: URL: https://github.com/apache/camel/pull/26622
## Description Starting with `camel.component.rest-openapi.host=http://localhost:8080/api` failed with ``` Error starting Camel: org.apache.camel.PropertyBindingException: Error binding property (camel.component.rest-openapi.host=http://localhost:8080/api) with name: host on bean: org.apache.camel.component.rest.openapi.RestOpenApiComponent@56826a75 with value: http://localhost:8080/api ``` and the reason, `host must be an absolute URI (e.g. http://api.example.com), given: ...`, sat two `Caused by` lines down the stack trace. The first line is what a person reads, what an IDE shows, and what a coding agent gets from a trimmed log. `PropertyBindingException.getMessage()` now ends with the message of the deepest cause, when there is one with a message and it is not another binding exception: ``` ... with value: http://localhost:8080/api: host must be an absolute URI (e.g. http://api.example.com), given: `http://localhost:8080/api` ``` Verified with the CLI on the case above. A cause without a message, or no cause, leaves the message as it was. Nothing else changes; the class is in camel-api and the message is not parsed anywhere (the only test that carries its text uses it as a diagnosis sample). Found in the round-2 local-model benchmark on the camel-jbang-examples ladder (openapi-client): the model read the first line and could only guess. Every setter that throws an IllegalArgumentException with a good message now surfaces it. ## Tests - `PropertyBindingExceptionTest`: the reason on a nested binding exception (the shape camel-main produces), on a plain one, with the no-name constructor; no change without a cause or with a cause that has no message. - The property binding tests of camel-core (83) green. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj -- 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]
