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

[FEATURE] Raise errors for HTTP error codes in the generic client #929

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

reta
Copy link
Collaborator

@reta reta commented Apr 9, 2024

Description

Provides the favour of the generic HTTP client that raises an exception if HTTP status indicates unsuccessful response.

Issues Resolved

Closes #927

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
dblock
dblock previously approved these changes Apr 10, 2024
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Let's re-add a OpenSearchGenericClient generic() without arguments that passes in ClientOptions.DEFAULT? It's just boilerplate, no?

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@dblock dblock merged commit 5ad54c6 into opensearch-project:main Apr 10, 2024
49 checks passed
@reta reta added the backport 2.x Backport to 2.x branch label Apr 10, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 10, 2024
* [FEATURE] Raise errors for HTTP error codes in the generic client

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Address code review comments

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

---------

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
(cherry picked from commit 5ad54c6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta pushed a commit that referenced this pull request Apr 10, 2024
* [FEATURE] Raise errors for HTTP error codes in the generic client

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Address code review comments

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

---------

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
(cherry picked from commit 5ad54c6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
reta pushed a commit that referenced this pull request Apr 10, 2024
…) (#931)

* [FEATURE] Raise errors for HTTP error codes in the generic client



* Address code review comments



---------


(cherry picked from commit 5ad54c6)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@BrendonFaleiro BrendonFaleiro mentioned this pull request Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Raise errors for HTTP error codes in the generic client
2 participants