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

Throw an explicit error when asStream is used with bulk helper #2078

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

JoshMock
Copy link
Member

The bulk helper does not support asStream, as it assumes the response will be parsed JSON rather than a raw stream. It currently takes a lot of debugging to understand why the helper fails in this case, so this adds an explicit check and throws an error with a clear message.

Thanks to @achyutjhunjhunwala for catching this (pun intended)!

@JoshMock JoshMock merged commit 4269197 into main Nov 16, 2023
10 checks passed
@JoshMock JoshMock deleted the bulk-helper-no-asstream branch November 16, 2023 16:14
github-actions bot pushed a commit that referenced this pull request Nov 16, 2023
github-actions bot pushed a commit that referenced this pull request Nov 16, 2023
@JoshMock JoshMock added apply-to-serverless Used by automation to generate a patch from a PR and apply it to elasticsearch-serverless-js and removed apply-to-serverless Used by automation to generate a patch from a PR and apply it to elasticsearch-serverless-js labels Mar 21, 2024
@JoshMock JoshMock added apply-to-serverless Used by automation to generate a patch from a PR and apply it to elasticsearch-serverless-js and removed apply-to-serverless Used by automation to generate a patch from a PR and apply it to elasticsearch-serverless-js labels Mar 27, 2024
JoshMock added a commit to elastic/elasticsearch-serverless-js that referenced this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apply-to-serverless Used by automation to generate a patch from a PR and apply it to elasticsearch-serverless-js backport 8.10 backport 8.11
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant