diff options
author | Bas van Kervel <bas@ethdev.com> | 2015-08-26 17:09:09 +0800 |
---|---|---|
committer | Bas van Kervel <bas@ethdev.com> | 2015-08-26 17:33:02 +0800 |
commit | f448310eef5abf1dfd10b25bfd22466cb5477dfd (patch) | |
tree | 2d2d07ecd4404e712cfe448197358b98278168cf /rpc/shared | |
parent | abce09954b6901b446c004ee06b389c338922f28 (diff) | |
download | go-tangerine-f448310eef5abf1dfd10b25bfd22466cb5477dfd.tar go-tangerine-f448310eef5abf1dfd10b25bfd22466cb5477dfd.tar.gz go-tangerine-f448310eef5abf1dfd10b25bfd22466cb5477dfd.tar.bz2 go-tangerine-f448310eef5abf1dfd10b25bfd22466cb5477dfd.tar.lz go-tangerine-f448310eef5abf1dfd10b25bfd22466cb5477dfd.tar.xz go-tangerine-f448310eef5abf1dfd10b25bfd22466cb5477dfd.tar.zst go-tangerine-f448310eef5abf1dfd10b25bfd22466cb5477dfd.zip |
bugfix console error handling
Diffstat (limited to 'rpc/shared')
-rw-r--r-- | rpc/shared/types.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/rpc/shared/types.go b/rpc/shared/types.go index 659b74bf6..dd9a60aab 100644 --- a/rpc/shared/types.go +++ b/rpc/shared/types.go @@ -74,11 +74,9 @@ type ErrorObject struct { } // Create RPC error response, this allows for custom error codes -func NewRpcErrorResponse(id interface{}, jsonrpcver string, errCode int, err error) *interface{} { - var response interface{} - +func NewRpcErrorResponse(id interface{}, jsonrpcver string, errCode int, err error) *ErrorResponse { jsonerr := &ErrorObject{errCode, err.Error()} - response = ErrorResponse{Jsonrpc: jsonrpcver, Id: id, Error: jsonerr} + response := ErrorResponse{Jsonrpc: jsonrpcver, Id: id, Error: jsonerr} glog.V(logger.Detail).Infof("Generated error response: %s", response) return &response |