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

chore: handle timeout errors in API requests (DEV-2513) #457

Merged
merged 5 commits into from
Aug 7, 2023

Conversation

jnussbaum
Copy link
Collaborator

No description provided.

@jnussbaum jnussbaum self-assigned this Aug 7, 2023
@linear
Copy link

linear bot commented Aug 7, 2023

DEV-2513 handle timeout errors in API requests

Currently, most API calls are executed once, and if they fail due to a timeout, nothing is done to recover. This has recently created some problems, when connectivity on users' machines was bad.

One idea how to improve it: Create a convenience method that executes the API call several times, with waiting intervals, each time increasing the timeout.

Copy link
Collaborator

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

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

I find the naming slightly misleading: try_api_call made me thing that it attempts a call to DSP-API, but it can actually be any HTTP call. So maybe http_call_with_retry would have been clearer to me. But that's obviously a detail.

@jnussbaum jnussbaum merged commit 4cdaf2a into main Aug 7, 2023
4 checks passed
@jnussbaum jnussbaum deleted the wip/catch_timeout_of_request branch August 7, 2023 14:43
@daschbot daschbot mentioned this pull request Aug 7, 2023
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.

2 participants