mirror of
https://github.com/PretendoNetwork/friends.git
synced 2024-05-17 20:30:47 -04:00
Add missing error handling (part 2)
This commit is contained in:
parent
06d89d8b77
commit
77a1cc11aa
|
@ -13,20 +13,15 @@ func MarkFriendRequestsAsReceived(err error, client *nex.Client, callID uint32,
|
|||
return nex.Errors.FPD.InvalidArgument
|
||||
}
|
||||
|
||||
var markErr error
|
||||
for i := 0; i < len(ids); i++ {
|
||||
id := ids[i]
|
||||
err = database_wiiu.SetFriendRequestReceived(id)
|
||||
if err != nil {
|
||||
globals.Logger.Critical(err.Error())
|
||||
markErr = err
|
||||
return nex.Errors.FPD.Unknown
|
||||
}
|
||||
}
|
||||
|
||||
if markErr != nil {
|
||||
return nex.Errors.FPD.Unknown
|
||||
}
|
||||
|
||||
rmcResponse := nex.NewRMCResponse(friends_wiiu.ProtocolID, callID)
|
||||
rmcResponse.SetSuccess(friends_wiiu.MethodMarkFriendRequestsAsReceived, nil)
|
||||
|
||||
|
|
Loading…
Reference in a new issue