mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 13:05:58 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user