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

Commit ba3c0a9

Browse files
committed
handle all error status codes in queryGroupChangeFromServer()
1 parent 5dd575a commit ba3c0a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

groupsv2/groupsv2.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ func (g *GroupV2) queryGroupChangeFromServer() (*signalservice.Group, error) {
177177
}
178178
if resp.IsError() {
179179
if resp.Status == 403 {
180-
return nil, fmt.Errorf(fmt.Sprintf("Not in group %s", resp.Status))
180+
return nil, fmt.Errorf(fmt.Sprintf("Not in group %d", resp.Status))
181181
}
182182
if resp.Status == 404 {
183-
184-
return nil, fmt.Errorf(fmt.Sprintf("Group not found %s", resp.Status))
183+
return nil, fmt.Errorf(fmt.Sprintf("Group not found %d", resp.Status))
185184
}
185+
return nil, resp
186186
}
187187
buf := new(bytes.Buffer)
188188
buf.ReadFrom(resp.Body)

0 commit comments

Comments
 (0)