aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-29 04:42:44 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-29 04:42:44 +0800
commitd9f8b1e0c145e9bd46fe3a78570310ed3bd7d09d (patch)
tree16982740070dddc16e96e4766988f27e070354c4 /rpc
parente80ef9ff34562410fbab63ccf173b17508b026ed (diff)
downloadgo-tangerine-d9f8b1e0c145e9bd46fe3a78570310ed3bd7d09d.tar.gz
go-tangerine-d9f8b1e0c145e9bd46fe3a78570310ed3bd7d09d.tar.zst
go-tangerine-d9f8b1e0c145e9bd46fe3a78570310ed3bd7d09d.zip
Report InvalidTypeError as -32602 to JSON RPC
Diffstat (limited to 'rpc')
-rw-r--r--rpc/http.go2
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: