Using hashicorp go-retryablehttp
library (https://github.com/hashicorp/go-retryablehttp)
It retries automatically for all 5xx
code:
retryablehttp performs automatic retries under certain conditions. Mainly, if an error is returned by the client (connection errors, etc.), or if a 500-range response code is received (except 501), then a retry is invoked after a wait period. Otherwise, the response is returned and left to the caller to interpret.
Is that possible it retries on Request Timeout
, e.g. on 408
http status code just ootb?
or I should build some custom wrappers?