This commit is contained in:
wangchuxiao
2022-04-08 15:40:07 +08:00
parent 59cc45eaab
commit 4efdabc1ff
14 changed files with 240 additions and 43 deletions
+2 -2
View File
@@ -38,6 +38,6 @@ func RespHttp200(ctx *gin.Context, err error, data interface{}) {
}
// warp error
func WrapError(err constant.ErrInfo) error {
return status.Error(codes.Code(err.ErrCode), err.ErrMsg)
func WrapError(err constant.ErrInfo, msg ...string) error {
return status.Error(codes.Code(err.ErrCode), err.ErrMsg+msg[0])
}