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

feat: obey http status and backoff on 429, 50x #156

Merged
merged 9 commits into from
Dec 15, 2023
Merged

Conversation

chriswk
Copy link

@chriswk chriswk commented Nov 29, 2023

This follows the same pattern as Java and .NET. each 429, 50x error will increment error count, and reset skips to error, then for each trigger reduce skips by 1 until you reach 0, then perform the action again. on success reduce error count by 1 and reset skips to error count.

On 401,403,404 will increment skips/errors to max at once and return an error saying you might've configured the client wrong

@chriswk chriswk marked this pull request as draft November 29, 2023 13:56
@chriswk chriswk self-assigned this Nov 29, 2023
@chriswk chriswk marked this pull request as ready for review November 30, 2023 10:01
Copy link
Contributor

@FredrikOseberg FredrikOseberg left a comment

Choose a reason for hiding this comment

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

LGTM. Small thing to fix, but feel free to merge once it's fixed.

repository.go Outdated Show resolved Hide resolved
@chriswk chriswk merged commit 1b50fe8 into v4 Dec 15, 2023
13 checks passed
@chriswk chriswk deleted the task/respectHttpStatusV4 branch December 15, 2023 13:39
@ivarconr
Copy link
Member

💯

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

Successfully merging this pull request may close these issues.

None yet

3 participants