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

Wrap GetRecords error in ScanShard #170

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

Conversation

AndreyPiterkin
Copy link

@AndreyPiterkin AndreyPiterkin commented Dec 10, 2024

Per #169, if kinesis.GetRecords returns an error and is not retryable, a new error is returned usingfmt.Errorf. However, instead of using the %w format code which wraps the specified error, %v is used, preventing errors.Is tests from passing on returned errors.

Changes

  • feat: wrap returned error using %w
  • test: add test assertion to verify wrapping functionality on GetRecordsError.

…error message

* wrap get records error using %w fmt code
* add unit test for kinesis get records using errors.Is
@AndreyPiterkin AndreyPiterkin changed the title wip: wrap error fix Wrap GetRecords error in ScanShard Dec 10, 2024
@AndreyPiterkin AndreyPiterkin marked this pull request as ready for review December 10, 2024 02:03
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.

1 participant