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

added isErrorOrStatus function and tests for RetryPolicy #4636

Closed
wants to merge 2 commits into from

Conversation

Adriani-Furtado
Copy link
Contributor

As per title, adding the new function to allow more control over the response checker

@@ -162,8 +162,11 @@ object RetryPolicy {
isErrorOrRetriableStatus(result)

def isErrorOrRetriableStatus[F[_]](result: Either[Throwable, Response[F]]): Boolean =
isErrorOrStatus(result, RetriableStatuses)

def isErrorOrStatus[F[_]](result: Either[Throwable, Response[F]], status: Set[Status]): Boolean =

Choose a reason for hiding this comment

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

If we could get a comment on this vs the other use case. As these were the only option previously. A little documentation on how and why you might use it would be useful as it was only clear to me after I looked at the unit test, which isn't in the same place as the source.

Choose a reason for hiding this comment

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

@ChristopherDavenport I have added a description. Let me know if it makes sense or if there is a better wording for it

@rossabaker
Copy link
Member

I think this can be cherry-picked back to 0.21 and released faster. I'll try that.

@rossabaker
Copy link
Member

This will be in the next 0.21 release (as well as 0.22 and 1.0).

@rossabaker rossabaker closed this Mar 24, 2021
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.

None yet

4 participants