packet name pb

This commit is contained in:
withchao
2023-03-16 10:46:06 +08:00
parent 8437c9a38b
commit 17de3e7927
208 changed files with 25300 additions and 15564 deletions
+2 -3
View File
@@ -1,8 +1,7 @@
package apiresp
import (
"OpenIM/pkg/errs"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
)
type apiResponse struct {
@@ -22,7 +21,7 @@ func apiError(err error) *apiResponse {
unwrap := errs.Unwrap(err)
var dlt string
if unwrap != err {
dlt = fmt.Sprintf("%+v", dlt)
dlt = err.Error()
}
if codeErr, ok := unwrap.(errs.CodeError); ok {
return &apiResponse{ErrCode: codeErr.Code(), ErrMsg: codeErr.Msg(), ErrDlt: dlt}