Hey! For go-resty retrycondition, I usually check for 5xx status codes and timeouts.
Here's a quick snippet I use:
```go
client.SetRetryCondition(func(r *resty.Response, err error) bool {
return r.StatusCode() >= 500 || err != nil
})
```
Also, set a max retry count with `SetRetryCount()` to avoid spamming the server. Works like a charm in prod!
Here's a quick snippet I use:
```go
client.SetRetryCondition(func(r *resty.Response, err error) bool {
return r.StatusCode() >= 500 || err != nil
})
```
Also, set a max retry count with `SetRetryCount()` to avoid spamming the server. Works like a charm in prod!
