Check response status code more strictly

This commit is contained in:
Elara 2022-12-10 15:40:52 -08:00
parent 1ca785de16
commit 848356eb08

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,
}