diff --git a/pkg/server/server.go b/pkg/server/server.go
index e9e9e7d96642cf953d2c4f1fa79888afd83293cb..5551ea335279556d36638d70bcc771540cc703f9 100644
--- a/pkg/server/server.go
+++ b/pkg/server/server.go
@@ -244,20 +244,20 @@ func (c *callResponder) send(ctx context.Context, env *callEnv) (err error) {
 								err = json.NewEncoder(e).EncodeWithOption(v.dat, func(eo *json.EncodeOption) {
 									eo.DisableNewline = true
 								})
+								if err != nil {
+									return
+								}
 							}
 						} else {
 							e.Null()
 						}
 					})
 					// a json encoding error here is possibly fatal.... try to encode the error, but there are no promises
-					if err != nil {
-						e.Field("error", func(e *jx.Encoder) {
-							codec.EncodeError(e, m.Error)
-						})
-						return
-					}
 				}
 			})
+			if err != nil {
+				return err
+			}
 		}
 		if env.batch {
 			enc.ArrEnd()