oscerd opened a new pull request, #26496: URL: https://github.com/apache/camel/pull/26496
## Issue [CAMEL-24765](https://issues.apache.org/jira/browse/CAMEL-24765) ## Problem & Fix Gap audit of camel-huaweicloud-functiongraph found two functional bugs (verified against main): - **Region dropped from the invoke URN when `endpoint` is set** — `ClientConfigurations` initialized the client from *either* `endpoint` *or* `region`, so setting the `endpoint` URI param meant `region` was never copied (even when the user also set `region`). `composeUrn` then produced `urn:fss:null:…`, which FunctionGraph rejects — so any route configured with `endpoint` failed to invoke. Region is now populated independently of the endpoint/region client-init choice. - **Brittle response-body extraction** — `extractJsonFieldAsString` forced `getAsJsonObject("body")`, throwing `ClassCastException` when a function returns `body` as a JSON string/primitive (the normal HTTP-triggered shape) and `NullPointerException` when `body` was absent. It now fetches the element, null-checks it, and returns the raw value for primitives / the JSON text for objects. Also fixes the proxy guard `ObjectHelper.isNotEmpty(getProxyPort())` on a primitive `int` (always true, so `proxyHost` with no `proxyPort` configured a proxy on port 0); now requires `getProxyPort() > 0`. ## Testing - New `FunctionGraphUtilsTest`: covers the string/numeric/object/absent `body` cases and asserts the invoke URN carries the region when `endpoint` is also configured. - Full `camel-huaweicloud-functiongraph` unit suite green. - `mvn -Psourcecheck validate` green. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
