diff --git a/protocol/json/server_request.go b/protocol/json/server_request.go index d23e716..06a5442 100644 --- a/protocol/json/server_request.go +++ b/protocol/json/server_request.go @@ -132,7 +132,7 @@ func (src *ServerRequestCodec) NewResponseWithString(reply string, err error) ([ res := src.newServerResponse(nil, err) r := strings.TrimSpace(reply) - if "" != r { + if nil == err && "" != r { var i interface{} mErr := json.Unmarshal([]byte(r), &i) if nil != mErr {