mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-04 01:22:47 +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 resp.StatusCode != http.StatusOK {
|
||||
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
||||
bodyBytes, err := io.ReadAll(io.LimitReader(resp.Body, responseBodyMaxLen))
|
||||
if err != nil {
|
||||
return gtserror.Newf("error reading Web Push server response: %w", err)
|
||||
|
|
Loading…
Reference in a new issue