Skip to content

Conversation

pquentin
Copy link
Member

In particular, this will give a clear error when using elasticsearch-py 9.0.0 on an 8.x clusters. Which helps with issues likes #2927 and #2923.

Before:

elasticsearch.BadRequestError: BadRequestError(400, 'media_type_header_exception', 'Invalid media-type value on headers [Accept, Content-Type]')

After:

elasticsearch.BadRequestError: BadRequestError(400, 'media_type_header_exception', 'Invalid media-type value on headers [Accept, Content-Type]', Accept version must be either version 8 or 7, but found 9. Accept=application/vnd.elasticsearch+json; compatible-with=9)

In particular, this will give a clear error when using elasticsearch-py 9.0.0
on an 8.x clusters.
@pquentin pquentin requested a review from miguelgrinberg April 17, 2025 13:32
@pquentin pquentin merged commit 72efd52 into elastic:main Apr 18, 2025
15 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 18, 2025
In particular, this will give a clear error when using elasticsearch-py 9.0.0
on an 8.x cluster.

(cherry picked from commit 72efd52)
github-actions bot pushed a commit that referenced this pull request Apr 18, 2025
In particular, this will give a clear error when using elasticsearch-py 9.0.0
on an 8.x cluster.

(cherry picked from commit 72efd52)
pquentin added a commit that referenced this pull request Apr 18, 2025
In particular, this will give a clear error when using elasticsearch-py 9.0.0
on an 8.x cluster.

(cherry picked from commit 72efd52)

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
pquentin added a commit that referenced this pull request Apr 18, 2025
In particular, this will give a clear error when using elasticsearch-py 9.0.0
on an 8.x cluster.

(cherry picked from commit 72efd52)

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants