get should return 200, but some people are weird

This commit is contained in:
Ted Unangst 2023-06-21 01:07:45 -04:00
parent 975de7188e
commit e8ee70d0f0
1 changed files with 5 additions and 1 deletions

View File

@ -165,7 +165,11 @@ func junkGet(userid int64, url string, args junk.GetArgs) (junk.Junk, error) {
} }
defer resp.Body.Close() 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 nil, fmt.Errorf("http get status: %d", resp.StatusCode)
} }
return junk.Read(resp.Body) return junk.Read(resp.Body)