fix: fix the error format

This commit is contained in:
Brabem 2024-01-18 20:51:51 +08:00
parent f814430be6
commit 10ad7bbe8c

View File

@ -16,6 +16,7 @@ package api
import (
"encoding/json"
"errors"
"fmt"
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/protocol/msg"
@ -542,7 +543,7 @@ func convertStructToMap(input interface{}) (map[string]interface{}, error) {
inputValue := reflect.ValueOf(input)
if inputType.Kind() != reflect.Struct {
return nil, errs.ErrArgs.Wrap("Input is not a struct")
return nil, errors.New("input is not a struct")
}
for i := 0; i < inputType.NumField(); i++ {