Explorar o código

Handle error in ChannelNewsFollow

Aditya Diwakar %!s(int64=4) %!d(string=hai) anos
pai
achega
b7ef3c8e0f
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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