Skip to content

Commit

Permalink
log retry number
Browse files Browse the repository at this point in the history
  • Loading branch information
nvthongswansea committed Sep 16, 2019
1 parent 227634f commit 2af7707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request.go
Expand Up @@ -101,9 +101,9 @@ RETRY:
json.Unmarshal(iostream, &errorMessage)
if result.StatusCode >= 500 {
latestRetryErr = errorMessage
c.cfg.logger.Errorf("RETRY! Error message: %v. Title: %v. Code: %v.", errorMessage.Description, errorMessage.Title, errorMessage.StatusCode)
time.Sleep(delayInterval) //delay the request, so we don't do too many requests to the server
retryNo++
c.cfg.logger.Errorf("RETRY no %d ! Error message: %v. Title: %v. Code: %v.", retryNo, errorMessage.Description, errorMessage.Title, errorMessage.StatusCode)
continue RETRY //continue the RETRY loop
}
c.cfg.logger.Errorf("Error message: %v. Title: %v. Code: %v.", errorMessage.Description, errorMessage.Title, errorMessage.StatusCode)
Expand Down

0 comments on commit 2af7707

Please sign in to comment.