Skip to content

Improve handling of empty response#126393

Merged
DaveCTurner merged 6 commits intoelastic:8.xfrom
DaveCTurner:2025/04/07/backport-125562-empty-response
Apr 8, 2025
Merged

Improve handling of empty response#126393
DaveCTurner merged 6 commits intoelastic:8.xfrom
DaveCTurner:2025/04/07/backport-125562-empty-response

Conversation

@DaveCTurner
Copy link
Copy Markdown
Member

Today ActionResponse$Empty implements ToXContentObject, but yields
no bytes of content when serialized which creates an invalid JSON
response. This commit removes the bogus interface and adjusts the
affected REST APIs to send a text/plain response instead.

Backport of #125562 to 8.x

Today `ActionResponse$Empty` implements `ToXContentObject`, but yields
no bytes of content when serialized which creates an invalid JSON
response. This commit removes the bogus interface and adjusts the
affected REST APIs to send a `text/plain` response instead.

Backport of elastic#125562 to `8.x`
Copy link
Copy Markdown
Contributor

@ldematte ldematte left a comment

Choose a reason for hiding this comment

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

LGTM

@DaveCTurner DaveCTurner merged commit 0dbe2d7 into elastic:8.x Apr 8, 2025
15 checks passed
@DaveCTurner DaveCTurner deleted the 2025/04/07/backport-125562-empty-response branch April 8, 2025 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants