rpc: fix bad method error for batch requests

If a batch request contained an invalid method, the server would reply
with a non-batch error response. Fix this by tracking an error for each
batch element.
This commit is contained in:
Felix Lange
2016-07-12 17:42:44 +02:00
parent c145589f25
commit bb01bea4e2
3 changed files with 15 additions and 9 deletions

View File

@ -88,6 +88,7 @@ type rpcRequest struct {
id interface{}
isPubSub bool
params interface{}
err RPCError // invalid batch element
}
// RPCError implements RPC error, is add support for error codec over regular go errors