Commit b61cfd92 authored by Matt Bell's avatar Matt Bell Committed by Juan Batiz-Benet

commands: Don't error when marshalling empty Responses

parent 4911dc06
...@@ -120,7 +120,7 @@ func (r *response) SetError(err error, code ErrorType) { ...@@ -120,7 +120,7 @@ func (r *response) SetError(err error, code ErrorType) {
func (r *response) Marshal() ([]byte, error) { func (r *response) Marshal() ([]byte, error) {
if r.err == nil && r.value == nil { 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) enc, ok := r.req.Option(EncShort)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment