From 4aa4417d9147521386a200df6db34c6d2513585c Mon Sep 17 00:00:00 2001 From: Bryan Date: Tue, 13 Feb 2024 09:30:48 +0800 Subject: [PATCH] chore: allow all 20x response status code in webhook (#2947) --- plugin/webhook/webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/webhook/webhook.go b/plugin/webhook/webhook.go index 90f98a3d1..aadc5344d 100644 --- a/plugin/webhook/webhook.go +++ b/plugin/webhook/webhook.go @@ -95,7 +95,7 @@ func Post(payload WebhookPayload) error { } 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) }