We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents afebb20 + 177689a commit b0b45a3Copy full SHA for b0b45a3
1 file changed
github/github.go
@@ -160,9 +160,18 @@ Pages:
160
dataNode, ok := rootNode["data"].(map[string]interface{})
161
if !ok {
162
retryCount++
163
- if retryCount < maxRetryCount {
+ errorMsg := strPropOrEmpty(rootNode, "message")
164
+ if errorMsg != "" {
165
+ log.Printf("Error accessing data element. Message: %s", errorMsg)
166
+ } else {
167
log.Println("Error accessing data element")
- time.Sleep(10 * time.Second)
168
+ }
169
+ if retryCount < maxRetryCount {
170
+ waitDuration := 10 * time.Second
171
+ if strings.Contains(strings.ToLower(errorMsg), "secondary rate limit") {
172
+ waitDuration = 65 * time.Second
173
174
+ time.Sleep(waitDuration)
175
continue Pages
176
} else {
177
log.Fatalln("Too many errors received. Quitting.")
0 commit comments