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

Backport #1199 Properly handle 413 Payload Too Large errors (#1199) #1206

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

donoghuc
Copy link
Contributor

Backport of #1199

* Properly handle `413` Payload Too Large errors

Previously when Elasticsearch responds with a 413 (Payload Too Large) status,
the manticore adapter raises an error before the response can be processed
by the bulk_send error handling. This commit refactors the way
`BadErrorResponse` codes are handled. Previously we had logic in the manticore
adaptor which special cased raising errors on some codes. This commit refactors
such that the adaptor raises on any error status and the caller is now
responsible for special case handling the code.

* 12.0.2 release prep

* Use `error_code` instead of `code` when handling BadResponseCodeError

Previously a few bugs spotted in code review were being obfuscated by the
combinations of tests not running in CI and the incorrect method for retrieving
a code from a BadResponseCodeError. This commit updates the method names and
addresses the feedback from code review.

---------

Co-authored-by: João Duarte <[email protected]>
Copy link
Contributor

@yaauie yaauie left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@donoghuc donoghuc merged commit 0261f27 into logstash-plugins:11.x Jan 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants