1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-11-29 21:47:44 +02:00

Respond with error type

This commit is contained in:
Asim Aslam
2019-01-13 12:15:35 +00:00
parent 01f6683035
commit e1bc240a14
4 changed files with 12 additions and 9 deletions

View File

@@ -31,7 +31,7 @@ func (j *jsonCodec) Write(m *codec.Message, b interface{}) error {
switch m.Type {
case codec.Request:
return j.c.Write(m, b)
case codec.Response:
case codec.Response, codec.Error:
return j.s.Write(m, b)
case codec.Publication:
data, err := json.Marshal(b)