rpc: more detailed errors

This commit is contained in:
Christian Schwarz 2017-05-06 10:58:23 +02:00
parent aa696dd0ce
commit 9b871fb7c0

View File

@ -256,7 +256,8 @@ func (c ByteStreamRPC) expectResponseType(rt ResponseType) (err error) {
} }
if h.ResponseType != rt { if h.ResponseType != rt {
return errors.New("unexpected response type in response header") return errors.New(fmt.Sprintf("unexpected response type in response header: got %#v, expected %#v. response header: %#v",
h.ResponseType, rt, h))
} }
return return
} }