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

Add 3 retries for host GET connections #34

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

Conversation

proletariandrift
Copy link

Sometimes in configurations with a large number of hosts, the following errors occur:

Error: could not a find host with a hostname <hostname>. Previous error message: Non-200 response on getting the hosts
│ body=401: Unauthorized

Retrying the request should solve the problem.

@disc
Copy link
Owner

disc commented Apr 5, 2023

Hey @proletariandrift - I believe it could be useful for other GET requests as well, not only for /hosts but in this way I'd love to see a more common solution for the issue.
One more thing - I think you need to make a next try only in case of HTTP code = 401, not for any non-200, cause I pretty sure you don't need to repeat a request in case of 400/404/etc.

@disc disc added the enhancement New feature or request label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants