From ffa401fb8d550d76572653344752f2d1231613b7 Mon Sep 17 00:00:00 2001 From: Mihai Parparita Date: Wed, 27 Feb 2019 22:56:53 -0800 Subject: [PATCH] Don't send emails about GitHub 502s --- app/retrogit.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/retrogit.go b/app/retrogit.go index e8c34be..1965ea5 100644 --- a/app/retrogit.go +++ b/app/retrogit.go @@ -9,6 +9,7 @@ import ( "net/http" "net/url" "strconv" + "strings" "sync" "time" @@ -267,6 +268,10 @@ var sendDigestForAccountFunc = delay.Func( }) func sendDigestErrorMail(e error, c appengine.Context, gitHubUserId int) { + if strings.Contains(e.Error(), ": 502") { + // Ignore 502s from GitHub, there's nothing we do about them. + return; + } errorMessage := &mail.Message{ Sender: "RetroGit Admin ", To: []string{"mihai.parparita@gmail.com"},