Browse Source

Handle error in ChannelNewsFollow

Aditya Diwakar 4 years ago
parent
commit
b7ef3c8e0f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      restapi.go

+ 3 - 0
restapi.go

@@ -1819,6 +1819,9 @@ func (s *Session) ChannelNewsFollow(channelID, targetID string) (st *ChannelFoll
 	}{targetID}
 
 	body, err := s.RequestWithBucketID("POST", endpoint, data, endpoint)
+	if err != nil {
+		return
+	}
 
 	err = unmarshal(body, &st)
 	return