From e8ee70d0f097e12a57e38f183ee9a48fcd4e1ac6 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Wed, 21 Jun 2023 01:07:45 -0400 Subject: [PATCH] get should return 200, but some people are weird --- activity.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/activity.go b/activity.go index dd0535d..d2653e3 100644 --- a/activity.go +++ b/activity.go @@ -165,7 +165,11 @@ func junkGet(userid int64, url string, args junk.GetArgs) (junk.Junk, error) { } defer resp.Body.Close() - if resp.StatusCode != 200 { + switch resp.StatusCode { + case 200: + case 201: + case 202: + default: return nil, fmt.Errorf("http get status: %d", resp.StatusCode) } return junk.Read(resp.Body)