Skip to content

Commit 4786ed1

Browse files
committed
fix: http backend needs to handle roundtrip errors better
1 parent b14df66 commit 4786ed1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

http-notifier.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ func (n *genericHTTPNotifier) sendMessageInternal(msg *Message,
5858
}
5959

6060
resp, e1 := common.NotifyHTTPTransporter.RoundTrip(req)
61-
e2 := parseResp(resp)
62-
63-
if e1 != nil || e2 != nil {
61+
if e1 != nil {
6462
return common.ErrorNotificationSendError
6563
}
64+
e2 := parseResp(resp)
65+
if e2 != nil {
66+
return common.ErrorNotifierParseResponseError
67+
}
6668

6769
} else {
6870
return common.ErrorNotifierNotReady

0 commit comments

Comments
 (0)