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

retry failed http request #18

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

retry failed http request #18

wants to merge 1 commit into from

Conversation

exuvia
Copy link

@exuvia exuvia commented Oct 15, 2024

fixing #17

Description by Korbit AI

What change is being made?

Add retry logic to the HTTP request method in the lumiwealth_tradier/base.py file to handle failed requests with exponential backoff.

Why are these changes being made?

The changes are being made to improve the robustness of the API client by automatically retrying failed HTTP requests, which can occur due to transient network issues or temporary server unavailability. This approach helps ensure that the client can recover from temporary failures without manual intervention, enhancing the reliability of the application.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

Copy link

korbit-ai bot commented Oct 15, 2024

You've used up your 5 PR reviews for this month under the Korbit Starter Plan. You'll get 5 more reviews on October 20th, 2024 or you can upgrade to Pro for unlimited PR reviews and enhanced features in your Korbit Console.

Copy link

korbit-ai bot commented Oct 15, 2024

I’ve found 3 issues in this PR, but you have exceeded your plan limits.

Upgrade to Korbit Pro and ask for another review with /korbit-review.

@exuvia
Copy link
Author

exuvia commented Oct 15, 2024

@grzesir I added code to retry failed HTTP requests. The default number of retries is 3 and the delay increases exponentially between attempts. Since log_message is not available in base.py, I surface a warning to inform the user that the request is being retried. I think this is less than ideal.

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.

1 participant