mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-01 07:03:15 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
commit
ba81f0e4b9
@ -740,7 +740,8 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup
|
||||
} else if req.HandleResult == constant.GroupResponseRefuse {
|
||||
chat.GroupApplicationRejectedNotification(req)
|
||||
} else {
|
||||
return nil, utils.Wrap(constant.ErrArgs, "")
|
||||
//return nil, utils.Wrap(constant.ErrArgs, "")
|
||||
return nil, constant.ErrArgs.Warp()
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
@ -2,11 +2,10 @@ package constant
|
||||
|
||||
import (
|
||||
sdkws "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/pkg/errors"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@ -25,11 +24,11 @@ func (e *ErrInfo) Code() int32 {
|
||||
}
|
||||
|
||||
func (e *ErrInfo) Warp() error {
|
||||
return utils.Wrap(e, "")
|
||||
return errors.WithStack(e)
|
||||
}
|
||||
|
||||
func (e *ErrInfo) WarpMessage(msg string) error {
|
||||
return utils.Wrap(e, msg)
|
||||
return errors.WithMessage(e, "")
|
||||
}
|
||||
|
||||
func NewErrNetwork(err error) error {
|
||||
|
@ -33,7 +33,7 @@ func init() {
|
||||
|
||||
func NewPrivateLog(moduleName string) {
|
||||
logger = loggerInit(moduleName)
|
||||
ctxLogger = loggerInit(moduleName)
|
||||
ctxLogger = ctxLoggerInit(moduleName)
|
||||
}
|
||||
|
||||
func ctxLoggerInit(moduleName string) *Logger {
|
||||
|
@ -179,7 +179,7 @@ func SetContextInfo(ctx context.Context, funcName string, logLevel logrus.Level,
|
||||
funcInfo.FuncName = funcName
|
||||
funcInfo.Err = err
|
||||
funcInfo.LogLevel = logLevel
|
||||
_, file, line, _ := runtime.Caller(0)
|
||||
_, file, line, _ := runtime.Caller(2)
|
||||
var s string
|
||||
i := strings.SplitAfter(file, "/")
|
||||
if len(i) > 3 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user