mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-05 01:52:46 +00:00
Accept any 2xx code as a success
This commit is contained in:
parent
a356c860dd
commit
74e30f06d2
|
@ -240,7 +240,7 @@ func (r *realSender) sendToSubscription(
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// If there's an error, log the response.
|
// If there's an error, log the response.
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
||||||
bodyBytes, err := io.ReadAll(io.LimitReader(resp.Body, responseBodyMaxLen))
|
bodyBytes, err := io.ReadAll(io.LimitReader(resp.Body, responseBodyMaxLen))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return gtserror.Newf("error reading Web Push server response: %w", err)
|
return gtserror.Newf("error reading Web Push server response: %w", err)
|
||||||
|
|
Loading…
Reference in a new issue