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

fix: allows registration of page iterator headers #309

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

rkodev
Copy link
Contributor

@rkodev rkodev commented Jul 12, 2024

Overview

Fixes #300

Allows registration of errors handler for PageIterator

Demo

	errorMapping := abstractions.ErrorMappings{
		"4XX": internal.CreateSampleErrorFromDiscriminatorValue,
		"5XX": internal.CreateSampleErrorFromDiscriminatorValue,
	}

	err := RegisterError(PageIteratorErrorRegistryKey, errorMapping)

Adding this line when using a page iterator should allow page iterator errors to be mapped

Testing

  • Added unit tests

@rkodev rkodev requested a review from a team as a code owner July 12, 2024 09:54
@rkodev rkodev force-pushed the feat/error-mapping-page-iterator branch from bf757e6 to 725a426 Compare July 12, 2024 11:42
Copy link

sonarcloud bot commented Jul 12, 2024

@rkodev rkodev merged commit d4b0806 into main Jul 15, 2024
8 checks passed
@rkodev rkodev deleted the feat/error-mapping-page-iterator branch July 15, 2024 06:36
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.

How to pass error handler to PageIterator?
3 participants