diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-29 04:42:44 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-29 04:42:44 +0800 |
commit | d9f8b1e0c145e9bd46fe3a78570310ed3bd7d09d (patch) | |
tree | 16982740070dddc16e96e4766988f27e070354c4 /rpc | |
parent | e80ef9ff34562410fbab63ccf173b17508b026ed (diff) | |
download | dexon-d9f8b1e0c145e9bd46fe3a78570310ed3bd7d09d.tar.gz dexon-d9f8b1e0c145e9bd46fe3a78570310ed3bd7d09d.tar.zst dexon-d9f8b1e0c145e9bd46fe3a78570310ed3bd7d09d.zip |
Report InvalidTypeError as -32602 to JSON RPC
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/http.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/http.go b/rpc/http.go index 879ffce3b..919c567bd 100644 --- a/rpc/http.go +++ b/rpc/http.go @@ -76,7 +76,7 @@ func RpcResponse(api *EthereumApi, request *RpcRequest) *interface{} { case *NotImplementedError: jsonerr := &RpcErrorObject{-32601, reserr.Error()} response = &RpcErrorResponse{Jsonrpc: jsonrpcver, Id: request.Id, Error: jsonerr} - case *DecodeParamError, *InsufficientParamsError, *ValidationError: + case *DecodeParamError, *InsufficientParamsError, *ValidationError, *InvalidTypeError: jsonerr := &RpcErrorObject{-32602, reserr.Error()} response = &RpcErrorResponse{Jsonrpc: jsonrpcver, Id: request.Id, Error: jsonerr} default: |