Skip to content

Add http-only headers to ElasticsearchException #130348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Jun 30, 2025

When return an error from Elasticsearch exceptions may contain values written as http response headers. ElasticsearchException contains a map of headers that are added to the response. But these values are also written to a special "header" section of the response body.

This commit renames the existing "headers" in ElasticsearchException to "body headers", which are both http headers and written to the response body. A new "http headers" is added for headers that should only be written as response headers.

When return an error from Elasticsearch exceptions may contain values
written as http response headers. ElasticsearchException contains a map
of headers that are added to the response. But these values are also
written to a special "header" section of the response body.

This commit renames the existing "headers" in ElasticsearchException to
"body headers", which are both http headers and written to the response
body. A new "http headers" is added for headers that should only be
written as response headers.
@rjernst rjernst requested a review from a team as a code owner June 30, 2025 18:16
@rjernst rjernst added :Core/Infra/REST API REST infrastructure and utilities >refactoring labels Jun 30, 2025
@elasticsearchmachine elasticsearchmachine added Team:Core/Infra Meta label for core/infra team v9.2.0 labels Jun 30, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@rjernst rjernst requested review from DaveCTurner and removed request for a team June 30, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/REST API REST infrastructure and utilities >refactoring Team:Core/Infra Meta label for core/infra team v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants