Skip to content

CAMEL-24238: camel-aws2-ses - send RawMessage body content instead of the SdkBytes descriptor#25016

Open
oscerd wants to merge 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/CAMEL-24238-418
Open

CAMEL-24238: camel-aws2-ses - send RawMessage body content instead of the SdkBytes descriptor#25016
oscerd wants to merge 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/CAMEL-24238-418

Conversation

@oscerd

@oscerd oscerd commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Backport of #25015 to camel-4.18.x.

Ses2Producer.createMessage() converted a RawMessage body with
raw.data().toString(), which yields the SdkBytes debug descriptor
(SdkBytes(bytes=0x...)) rather than the MIME payload — so that descriptor was
sent as the e-mail body. Fixed by reading raw.data().asUtf8String().

The bug is present on this branch verbatim. Cherry-picked cleanly;
SesComponentTest passes (5/5) on this branch.

Upgrade-guide note is not applicable — this is a plain bug fix with no
user-visible configuration change.


Claude Code on behalf of oscerd

… the SdkBytes descriptor

When the exchange body is an SES RawMessage, Ses2Producer built the outgoing
Content from the body converted to String, which for a RawMessage falls back
to Object.toString() on the SDK type. SdkBytes.toString() renders a debug
descriptor ("SdkBytes(bytes=0x46726f6d...)"), so the recipient received that
descriptor instead of the MIME payload.

Read the payload from RawMessage.data().asUtf8String() when the body is a
RawMessage, and cover it with a test asserting the sent text equals the
original MIME content.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
(cherry picked from commit b100364)
@oscerd oscerd added the bug Something isn't working label Jul 22, 2026
@oscerd
oscerd requested a review from davsclaus July 22, 2026 11:20
@oscerd oscerd added this to the 4.18.4 milestone Jul 22, 2026
@oscerd
oscerd requested a review from Croway July 22, 2026 11:20

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean backport of #25015 to camel-4.18.x. Identical fix (SdkBytes.toString()asUtf8String()) and test. Cherry-pick applies cleanly.

Reviewed with Claude Code on behalf of gnodet. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean backport of the SES SdkBytes.toString()asUtf8String() fix to camel-4.18.x. The bug (introduced in CAMEL-21593) caused SdkBytes.toString() to return a debug descriptor (SdkBytes(bytes=0x...)) instead of the actual payload — asUtf8String() is the correct API. Test validates the fix. CI is green.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants