fix: fix the error format

pull/1783/head
Brabem 2 years ago
parent f814430be6
commit 10ad7bbe8c

@ -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++ {

Loading…
Cancel
Save