reddit: unexpected status error codes are bubbled up
All checks were successful
/ push (push) Successful in 2m19s

This commit is contained in:
Tigor Hutasuhut 2024-06-11 15:15:25 +07:00
parent ca96d4a805
commit c50b4a18a1

View file

@ -82,7 +82,7 @@ func (reddit *Reddit) downloadImage(ctx context.Context, post Post, kind bmessag
return nil, errs.Fail("unexpected status code when trying to download images",
"url", url,
"status_code", resp.StatusCode,
)
).Code(resp.StatusCode)
}
idleSpeedStr := reddit.Config.String("download.timeout.idlespeed")
metricSpeed, _ := units.ParseMetricBytes(idleSpeedStr)