all repos — honk @ d8c806f17382698deb007894a2fd31f87f7e298b

my fork of honk

just sleep if we get error 502
Ted Unangst tedu@tedunangst.com
Fri, 25 Sep 2020 18:46:15 -0400
commit

d8c806f17382698deb007894a2fd31f87f7e298b

parent

f21cd66394f422dca126d090ee278f3c671ed417

1 files changed, 5 insertions(+), 0 deletions(-)

jump to
M toys/autobonker.gotoys/autobonker.go

@@ -41,6 +41,11 @@ log.Fatal(err)

} defer resp.Body.Close() if resp.StatusCode != 200 { + if resp.StatusCode == 502 { + log.Printf("server error 502...") + time.Sleep(5 * time.Minute) + return HonkSet{} + } answer, _ := ioutil.ReadAll(resp.Body) log.Fatalf("status: %d: %s", resp.StatusCode, answer) }