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

Raise when any records are invalid #394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pabloconde
Copy link

Changes Introduced

Raise error when there is at least one invalid record. Previously it was only raising when there was at least one failed record.

Applicable linked issues

Checklist (check all that apply)

  • This change maintains backwards compatibility
  • I have introduced tests for all new features and changes
  • I have added documentation covering all new features and changes
  • This pull-request is ready for review

@mergify mergify bot added the shared label Oct 14, 2024
@@ -216,7 +216,7 @@ abstract class Producer[F[_], PutReq, PutRes] private[kinesis4cats] (
)
)(ref.get.flatMap(x => _put(x.inputRecords, x.retrying)))
_ <-
if (finalRes.hasFailed) {
if (finalRes.hasErrors) {
Copy link
Author

Choose a reason for hiding this comment

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

This is a change in behaviour. Before, you would only see invalid records if there was at least one failed record also. Does this change align with the documentation?

A user can configure the producer to raise an exception if any of the error paths are detected (including partially failed records).

* @param raiseOnFailures
* If true, an exception will be raised if a
* [[kinesis4cats.producer.Producer.Error Producer.Error]] is detected in
* one of the batches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant