From 535144146b5f5954e46c2b52b39fea0d8c8f0764 Mon Sep 17 00:00:00 2001 From: Matthieu Dolci Date: Thu, 30 Aug 2018 14:33:23 -0700 Subject: [PATCH] Adding continue to rety the loop when getting 504 (#23) --- standup/standup.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/standup/standup.go b/standup/standup.go index 9912913..227564d 100644 --- a/standup/standup.go +++ b/standup/standup.go @@ -80,6 +80,7 @@ func AskStandupYesterday(s *common.Slack, ev *slack.MessageEvent) error { log.WithFields(log.Fields{ "timestamp": timestamp, }).WithError(err).Error("Could not get the IM history of the message") + continue } log.WithFields(log.Fields{ "timestamp": timestamp, @@ -185,6 +186,7 @@ loop: log.WithFields(log.Fields{ "timestamp": timestamp, }).WithError(err).Error("Could not get the IM history of the message") + continue } log.WithFields(log.Fields{ "timestamp": timestamp, @@ -300,6 +302,7 @@ loop: log.WithFields(log.Fields{ "timestamp": timestamp, }).WithError(err).Error("Could not get the IM history of the message") + continue } log.WithFields(log.Fields{ "timestamp": timestamp, @@ -418,10 +421,12 @@ loop: log.WithFields(log.Fields{ "timestamp": timestamp, }).WithError(err).Error("Could not get the IM history of the message") + continue } log.WithFields(log.Fields{ "timestamp": timestamp, }).Debug("Getting IM history of the message") + message := history.Messages if len(message) == 0 {