Commit fff61d99 authored by Mudassar Khan's avatar Mudassar Khan
Browse files

fix: status code 200:ok also accepted

parent c8185c3d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -248,8 +248,8 @@ func (sub *Subscription) sendNotification(notif []byte, sandbox string, service
	}
	defer notifResp.Body.Close()

	// Validate returned status code
	if notifResp.StatusCode != http.StatusNoContent {
	// Validate returned status code — accept any 2xx response
	if notifResp.StatusCode < http.StatusOK || notifResp.StatusCode >= http.StatusMultipleChoices {
		err := errors.New("Unexpected response status: [" + strconv.Itoa(notifResp.StatusCode) + "] " + notifResp.Status)
		log.Error(err)
		return err