Browse Source

server: return result with error

pull/456/head
Ethan Buchman 8 years ago
parent
commit
39ee59c26e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      server/handlers.go

+ 1
- 1
server/handlers.go View File

@ -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, ""))


Loading…
Cancel
Save