Check response status code more strictly

This commit is contained in:
Elara 2022-12-10 15:40:52 -08:00
parent 519c58f847
commit 7fc04591ba

View File

@ -140,7 +140,7 @@ func resError(res *http.Response, lr types.LemmyResponse) error {
Code: res.StatusCode,
ErrStr: lr.Error.MustValue(),
}
} else if res.StatusCode > 299 {
} else if res.StatusCode != http.StatusOK {
return types.HTTPError{
Code: res.StatusCode,
}