mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-05 17:45:59 +08:00
errCode
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package constant
|
||||
|
||||
import (
|
||||
sdkws "Open_IM/pkg/proto/sdk_ws"
|
||||
"errors"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -76,6 +77,17 @@ func ToAPIErrWithErr(err error) ErrInfo {
|
||||
return ErrDefaultOther
|
||||
}
|
||||
|
||||
func Error2CommResp(info ErrInfo, detailErr error) *sdkws.CommonResp {
|
||||
err := &sdkws.CommonResp{
|
||||
ErrCode: info.ErrCode,
|
||||
ErrMsg: info.ErrMsg,
|
||||
}
|
||||
if detailErr != nil {
|
||||
err.DetailErrMsg = detailErr.Error()
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
const (
|
||||
FormattingError = 10001
|
||||
HasRegistered = 10002
|
||||
|
||||
+1114
-2093
File diff suppressed because it is too large
Load Diff
@@ -76,7 +76,7 @@ message AddBlacklistReq{
|
||||
CommID CommID = 1;
|
||||
}
|
||||
message AddBlacklistResp{
|
||||
CommonResp CommonResp = 1;
|
||||
server_api_params.CommonResp commonResp = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+405
-347
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,11 @@ package server_api_params;
|
||||
|
||||
|
||||
////////////////////////////////base///////////////////////////////
|
||||
|
||||
message CommonResp{
|
||||
int32 errCode = 1;
|
||||
string errMsg = 2;
|
||||
string detailErrMsg =3;
|
||||
}
|
||||
|
||||
message GroupInfo{
|
||||
string groupID = 1;
|
||||
|
||||
Reference in New Issue
Block a user