diff --git a/protocol/json/client.go b/protocol/json/client.go index 933572b..112ed1d 100644 --- a/protocol/json/client.go +++ b/protocol/json/client.go @@ -34,7 +34,7 @@ type clientRequest struct { type clientResponse struct { Version string `json:"jsonrpc"` Result *json.RawMessage `json:"result"` - Error interface{} `json:"error"` + Error error `json:"error"` ID interface{} `json:"id"` } diff --git a/protocol/json/client_response.go b/protocol/json/client_response.go index f1398e7..b1d29db 100644 --- a/protocol/json/client_response.go +++ b/protocol/json/client_response.go @@ -52,7 +52,7 @@ func (ccr *ClientCodecResponse) Result() interface{} { } func (ccr *ClientCodecResponse) Error() error { - return ccr.response.Error.(error) + return ccr.response.Error } func (ccr *ClientCodecResponse) Complete() {