mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
show more error detail for invalidMessageError
This commit is contained in:
parent
df3f0a81a7
commit
204e00a91f
1 changed files with 2 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ package rpc
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
|
@ -152,7 +153,7 @@ func (s *Server) serveSingleRequest(ctx context.Context, codec ServerCodec) {
|
|||
reqs, batch, err := codec.readBatch()
|
||||
if err != nil {
|
||||
if err != io.EOF {
|
||||
resp := errorMessage(&invalidMessageError{"parse error"})
|
||||
resp := errorMessage(&invalidMessageError{fmt.Sprintf("parse error: %s", err.Error())})
|
||||
codec.writeJSON(ctx, resp, true)
|
||||
}
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue