From a52c474f1184b59f109934be00f10c8088b890cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Tue, 15 Nov 2022 19:24:16 +0100 Subject: [PATCH] github: fix rate limiting It seems like the error message that github return changed. --- bridge/github/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bridge/github/client.go b/bridge/github/client.go index 00981a569789d2d18f8f2ef29973fd6025b2a520..57c8646a98adcb8942199863b3b08f35c74ddc24 100644 --- a/bridge/github/client.go +++ b/bridge/github/client.go @@ -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()