Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
handle all error status codes in queryGroupChangeFromServer()
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackoverflow committed Oct 29, 2022
1 parent 5dd575a commit ba3c0a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions groupsv2/groupsv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ func (g *GroupV2) queryGroupChangeFromServer() (*signalservice.Group, error) {
}
if resp.IsError() {
if resp.Status == 403 {
return nil, fmt.Errorf(fmt.Sprintf("Not in group %s", resp.Status))
return nil, fmt.Errorf(fmt.Sprintf("Not in group %d", resp.Status))
}
if resp.Status == 404 {

return nil, fmt.Errorf(fmt.Sprintf("Group not found %s", resp.Status))
return nil, fmt.Errorf(fmt.Sprintf("Group not found %d", resp.Status))
}
return nil, resp
}
buf := new(bytes.Buffer)
buf.ReadFrom(resp.Body)
Expand Down

0 comments on commit ba3c0a9

Please sign in to comment.