err handle

This commit is contained in:
Gordon 2021-12-17 11:14:43 +08:00
parent 7a6df3abd3
commit 7403619cbc
2 changed files with 6 additions and 3 deletions

View File

@ -146,7 +146,12 @@ func ManagementSendMsg(c *gin.Context) {
log.Info("", "", "api ManagementSendMsg call, api call rpc...")
reply, _ := client.UserSendMsg(context.Background(), pbData)
reply, err := client.UserSendMsg(context.Background(), pbData)
if err != nil {
log.NewError(params.OperationID, "call delete UserSendMsg rpc server failed", err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call UserSendMsg rpc server failed"})
return
}
log.Info("", "", "api ManagementSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String())
c.JSON(http.StatusOK, gin.H{

View File

@ -51,8 +51,6 @@ const (
Revoke = 205
C2CMessageAsRead = 206
KickOnlineTip = 303
TransferGroupOwnerTip = 501
CreateGroupTip = 502
GroupApplicationResponseTip = 503