Skip to content
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

warnings() should not include warnings not originating from Elasticsearch #33

Closed
rudolf opened this issue Dec 7, 2021 · 0 comments · Fixed by #79
Closed

warnings() should not include warnings not originating from Elasticsearch #33

rudolf opened this issue Dec 7, 2021 · 0 comments · Fixed by #79
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rudolf
Copy link

rudolf commented Dec 7, 2021

The elasticsearch-js client exposes Elasticsearch deprecations through the warnings getter:

https://github.com/elastic/elastic-transport-js/blob/main/src/Transport.ts#L333

However, this returns all the warning headers which could include warnings from intermediate proxies.

Given the htttp specification for warning headers https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.46

We should be able to include only warning headers from Elasticsearch with a pattern like /\d\d\d Elasticsearch-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants