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

Allow errors from CheckRetry to be logged #217

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

Conversation

RichieSams
Copy link

With HTTP requests, there are requests which "succeed" in terms of the HTTP standard, but are failures for a "normal" client. For example, 503 status returns.

With the DefaultCheckRetry, 503 errors are set to be retried, but since the request itself completed without error, this "error" isn't communicated to the user at all. So to the user, it can seem like code is hanging, when in reality, it's doing the "correct" backoffs and retries.

This change therefore will additionally print the error logs if checkErr is non-nil

With HTTP requests, there are requests which "succeed" in terms of the HTTP standard, but are failures for a "normal" client. For example, 503 status returns.

With the DefaultCheckRetry, 503 errors *are* set to be retried, but since the request itself completed without error, this "error" isn't communicated to the user at all. So to the user, it can seem like code is hanging, when in reality, it's doing the "correct" backoffs and retries.

This change therefore will additionally print the error logs if `checkErr` is non-nil
@RichieSams RichieSams requested review from a team, modrake and claire-labry April 18, 2024 19:51
Copy link

hashicorp-cla-app bot commented Apr 18, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

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.

2 participants