mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
Accept any 2xx code as a success
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user