get should return 200, but some people are weird
Ted Unangst tedu@tedunangst.com
Wed, 21 Jun 2023 01:07:45 -0400
1 files changed,
5 insertions(+),
1 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -165,7 +165,11 @@ return nil, err
} 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)