jsonrpc: include method name in error log

This commit is contained in:
Łukasz Magiera 2019-09-16 20:04:36 +02:00
parent c275d1fb6a
commit 5470fbeb8a

View File

@ -212,7 +212,7 @@ func (h handlers) handle(ctx context.Context, req request, w func(func(io.Writer
if handler.errOut != -1 { if handler.errOut != -1 {
err := callResult[handler.errOut].Interface() err := callResult[handler.errOut].Interface()
if err != nil { if err != nil {
log.Warnf("error in RPC call: %s", err) log.Warnf("error in RPC call to '%s': %s", req.Method, err)
resp.Error = &respError{ resp.Error = &respError{
Code: 1, Code: 1,
Message: err.(error).Error(), Message: err.(error).Error(),