Handle Coingecko Throttled error
This commit is contained in:
parent
913c0e5198
commit
2c84ed4eb2
@ -144,7 +144,7 @@ func (cg *Coingecko) makeReq(url string, endpoint string) ([]byte, error) {
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
if err.Error() != "error code: 1015" && !strings.Contains(strings.ToLower(err.Error()), "exceeded the rate limit") {
|
||||
if err.Error() != "error code: 1015" && !strings.Contains(strings.ToLower(err.Error()), "exceeded the rate limit") && !strings.Contains(strings.ToLower(err.Error()), "throttled") {
|
||||
if cg.metrics != nil {
|
||||
cg.metrics.CoingeckoRequests.With(common.Labels{"endpoint": endpoint, "status": "error"}).Inc()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user