aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/util.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-13 23:36:27 +0800
committerobscuren <geffobscura@gmail.com>2015-03-13 23:36:27 +0800
commitb663e8b29a7451a79b909c017f8a244d23c8fef4 (patch)
tree722ffd039ea9970170bbe054f8044625bc719373 /rpc/util.go
parentf1fcda4f2fe05e46e3d350cb89a52fd33df3767f (diff)
parente3b64d70c212d893c147b8af62abe5c03fb2f492 (diff)
downloaddexon-b663e8b29a7451a79b909c017f8a244d23c8fef4.tar.gz
dexon-b663e8b29a7451a79b909c017f8a244d23c8fef4.tar.zst
dexon-b663e8b29a7451a79b909c017f8a244d23c8fef4.zip
Merge branch 'rpcfrontier' into develop
Diffstat (limited to 'rpc/util.go')
-rw-r--r--rpc/util.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/rpc/util.go b/rpc/util.go
index 8ff3c6d31..573190e59 100644
--- a/rpc/util.go
+++ b/rpc/util.go
@@ -42,7 +42,7 @@ type JsonWrapper struct{}
func UnmarshalRawMessages(b []byte, iface interface{}, number *int64) (err error) {
var data []json.RawMessage
if err = json.Unmarshal(b, &data); err != nil && len(data) == 0 {
- return errDecodeArgs
+ return NewDecodeParamError(err.Error())
}
// Number index determines the index in the array for a possible block number
@@ -74,7 +74,7 @@ func UnmarshalRawMessages(b []byte, iface interface{}, number *int64) (err error
fallthrough
default:
if err = json.Unmarshal(data[0], iface); err != nil {
- return errDecodeArgs
+ return NewDecodeParamError(err.Error())
}
numberIndex = 1
}
@@ -82,7 +82,7 @@ func UnmarshalRawMessages(b []byte, iface interface{}, number *int64) (err error
// <0 index means out of bound for block number
if numberIndex >= 0 && len(data) > numberIndex {
if err = blockNumber(data[numberIndex], number); err != nil {
- return errDecodeArgs
+ return NewDecodeParamError(err.Error())
}
}