Skip to content

Commit 783afb9

Browse files
committed
Merge branch 'master' into development
* master: Bug 1971281 - Webhooks fail with anything other than 200 response code
2 parents d9a730a + 0e6f580 commit 783afb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extensions/Push/lib/Connector/Webhook.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ sub send {
177177
}
178178

179179
my $tx = mojo_user_agent()->post($webhook->url, $headers => json => $payload);
180-
if ($tx->res->code != 200) {
181-
die 'Expected HTTP 200, got '
180+
if (!$tx->res->is_success) {
181+
die 'Expected HTTP 2xx, got '
182182
. $tx->res->code . ' ('
183183
. $tx->error->{message} . ') '
184184
. $tx->res->body;

0 commit comments

Comments
 (0)