From b61cfd9224339dd74188e9dd81f606b36a85a0bd Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Wed, 29 Oct 2014 02:20:26 -0700 Subject: [PATCH] commands: Don't error when marshalling empty Responses --- commands/response.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/response.go b/commands/response.go index f3ba0d9a6..a61e8db96 100644 --- a/commands/response.go +++ b/commands/response.go @@ -120,7 +120,7 @@ func (r *response) SetError(err error, code ErrorType) { func (r *response) Marshal() ([]byte, error) { if r.err == nil && r.value == nil { - return nil, fmt.Errorf("No error or value set, there is nothing to marshal") + return []byte{}, nil } enc, ok := r.req.Option(EncShort)