mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: allow all 20x response status code in webhook (#2947)
This commit is contained in:
@ -95,7 +95,7 @@ func Post(payload WebhookPayload) error {
|
|||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
||||||
return errors.Errorf("failed to post webhook %s, status code: %d, response body: %s", payload.URL, resp.StatusCode, b)
|
return errors.Errorf("failed to post webhook %s, status code: %d, response body: %s", payload.URL, resp.StatusCode, b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user