This commit is contained in:
crusader 2018-03-14 20:17:10 +09:00
parent dfb3b53775
commit 3b15bbd349

View File

@ -148,16 +148,21 @@ func (src *ServerRequestCodec) Params() ([]string, error) {
var results []string var results []string
for _, v := range values { for _, v := range values {
b, err := json.Marshal(v) switch v := v.(type) {
if nil != err { case string:
src.err = &Error{ results = append(results, v)
Code: E_INVALID_REQ, default:
Message: err.Error(), b, err := json.Marshal(v)
Data: src.req.Params, if nil != err {
src.err = &Error{
Code: E_INVALID_REQ,
Message: err.Error(),
Data: src.req.Params,
}
return nil, src.err
} }
return nil, src.err results = append(results, string(b))
} }
results = append(results, string(b))
} }
return results, nil return results, nil