From 39ee59c26e3b25aeef7c0e2c360f0fe1a27a4182 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 22 Jul 2016 01:13:16 -0400 Subject: [PATCH] server: return result with error --- server/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/handlers.go b/server/handlers.go index 1c447c6c9..82fd7b358 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -132,7 +132,7 @@ func makeJSONRPCHandler(funcMap map[string]*RPCFunc) http.HandlerFunc { log.Info("HTTPJSONRPC", "method", request.Method, "args", args, "returns", returns) result, err := unreflectResult(returns) if err != nil { - WriteRPCResponseHTTP(w, NewRPCResponse(request.ID, nil, err.Error())) + WriteRPCResponseHTTP(w, NewRPCResponse(request.ID, result, err.Error())) return } WriteRPCResponseHTTP(w, NewRPCResponse(request.ID, result, ""))