mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-29 05:38:45 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
commit
1bb33a2dfc
@ -3,6 +3,7 @@ package mw
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
||||||
@ -90,8 +91,9 @@ func GinParseOperationID() gin.HandlerFunc {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if req.OperationID == "" {
|
if req.OperationID == "" {
|
||||||
log.ZWarn(c, "header must have operationID", errs.ErrArgs.Wrap(err.Error()))
|
err := errors.New("header must have operationID")
|
||||||
apiresp.GinError(c, errs.ErrArgs.Wrap("header must have operationID"+err.Error()))
|
log.ZWarn(c, "header must have operationID", err)
|
||||||
|
apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error()))
|
||||||
c.Abort()
|
c.Abort()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user