AnswerDotAI / AnswerDotAI/ghapi

Add retries and timeout options to API calls

Open
#185 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
685
Forks
70
Avg merge
1m
Merged PRs (30d)
2

Description

Add to all the API calls the `retries` and `timeout` options to manage the error responses. Consider a `retry-wait` option to manage retry speed.

`retries` - number of times to try the request before failing (default=1)
`timeout` - time to wait before interpreting the request as failed
`retry-wait` - the base time to wait between tries for exponential backoff

Note: `retries` should probably be `tries` but the parameter name retries is in too wide use to fight against.

It would be useful if these options were added to GhApi as defaults for all API calls made.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.