AnswerDotAI / ghapi

A delightful and complete interface to GitHub's amazing API
https://ghapi.fast.ai/
Apache License 2.0
626 stars 65 forks source link

Add retries and timeout options to API calls #185

Open david-hodgson-at-sky opened 2 weeks ago

david-hodgson-at-sky commented 2 weeks ago

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.

david-hodgson-at-sky commented 2 weeks ago

Possibly related to #110