Error code standardization

This commit is contained in:
skiffer-git
2023-02-13 17:48:01 +08:00
parent 048d4b83e1
commit a9dec0c832
2 changed files with 167 additions and 168 deletions
+12
View File
@@ -46,6 +46,13 @@ var (
ErrDB = ErrDatabase
ErrSendLimit = ErrInternalServer
ErrBlockedByPeer = &ErrInfo{BlockedByPeer, "BlockedByPeer", ""}
//不是对方的好友
ErrNotPeersFriend = &ErrInfo{NotPeersFriend, "NotPeersFriend", ""}
//
ErrMutedInGroup = &ErrInfo{MutedInGroup, "MutedInGroup", ""}
ErrMutedGroup = &ErrInfo{MutedGroup, "MutedGroup", ""}
)
const (
@@ -93,6 +100,8 @@ const (
RelationshipAlreadyError = 92001 //已经是好友关系(或者黑名单)
NotRelationshipYetError = 92002 //不是好友关系(或者黑名单)
CanNotAddYourselfError = 92003 //不能添加自己为好友
BlockedByPeer = 92004 //被对方拉黑
NotPeersFriend = 92005 //不是对方的好友
)
// 群组错误码
@@ -104,6 +113,9 @@ const (
OwnerNotAllowedQuitError = 93004 //群主不能退群
GroupTypeNotSupport = 93005
GroupNoOwner = 93006
MutedInGroup = 93007 //群成员被禁言
MutedGroup = 93008 //群被禁言
)
// 用户错误码