saravanakumar1987 opened a new pull request, #31404: URL: https://github.com/apache/camel/pull/31404
# Description Fixes [CAMEL-28119](https://issues.apache.org/jira/browse/CAMEL-28119). ## Summary After a network error, the exchange failed with a `TeaUnretryableException` that had no message and no cause. The producer also ignored some headers, exchange properties and `Map` keys, or failed on them with an unexpected exception. A route now gets an `IOException` that names the host, and an `IllegalArgumentException` for a value the producer cannot read. - `AlibabaEventBridgeProducer` wraps such an exception in an `IOException`, and the two `EventSourceCache` exception messages use the same words. - `AlibabaEventBridgeUtils` checks the boolean and TTL texts, reads the TTL only for cloud validation, and adds `traceId` to entry maps. - `AlibabaEventBridgeEndpoint` parses the `allowedEventSources` option when it starts, so invalid JSON fails the start. - `MapCloudEventValidator` checks the type of `time`, skips a blank Alibaba key, and encodes the data in the charset of `datacontenttype`. - The upgrade guide has a section on it. ### Why blank texts fail, `?` can replace a character, and the 4.23 guide changes A blank boolean or TTL text fails like `abc`. `getMapValue` skips a blank text only for keys with a second key, such as `eventSource`. `String.getBytes` replaces a character that the charset cannot encode, for example with `?` in ISO-8859-1. So the data still goes out. The 4.23 guide tied the `time` check to `validateEventSpec`, but the producer always checks `time`. ## Tests - `PutEventsChecksTest` checks the new behavior with a mocked client, or a real client whose `doRequest` returns a fixed map. - The 22 tests that compile without the new constant failed before the change, and `eachEntryMapHasTheTraceId` needs that constant. - The module build of camel-alibaba-eventbridge ran 84 tests, none of them skipped, with no failure. - The catalog build ran 156 tests of `CamelCatalogTest`, none of them skipped, with no failure. # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [x] I ran `mvn clean install -Dquickly -DskipTests` on the parent commit, and resumed it from camel-kserve with `-Dgrpc-version=1.85.1`. Then I ran `mvn install -nsu` in camel-alibaba-eventbridge and `mvn install -nsu -Dtest=CamelCatalogTest` in catalog/camel-catalog, and committed all generated changes. # AI-assisted contributions - [x] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used. _Claude Code on behalf of saravanakumar1987_ 🤖 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]
