mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-13 12:05:02 +03:00
github: fix rate limiting
It seems like the error message that github return changed.
This commit is contained in:
parent
53059ecbfe
commit
a52c474f11
@ -130,7 +130,8 @@ func (c *rateLimitHandlerClient) callAPIDealWithLimit(ctx context.Context, apiCa
|
||||
return nil
|
||||
}
|
||||
// matching the error string
|
||||
if strings.Contains(err.Error(), "API rate limit exceeded") {
|
||||
if strings.Contains(err.Error(), "API rate limit exceeded") ||
|
||||
strings.Contains(err.Error(), "was submitted too quickly") {
|
||||
// a rate limit error
|
||||
qctx, cancel = context.WithTimeout(ctx, defaultTimeout)
|
||||
defer cancel()
|
||||
|
Loading…
Reference in New Issue
Block a user