diff --git a/pkg/backup/main.go b/pkg/backup/main.go index ff5d95962..531353536 100644 --- a/pkg/backup/main.go +++ b/pkg/backup/main.go @@ -49,7 +49,7 @@ func ResponseLogAndError(v interface{}) { e, isErr := v.(error) _, isRuntimeErr := e.(runtime.Error) if isErr && !isRuntimeErr { - logrus.Errorf(fmt.Sprint(e)) + logrus.Errorf("%v", e) fmt.Println(fmt.Sprint(e)) } else { logrus.Errorf("Caught FATAL error: %s", v) diff --git a/pkg/replica/diff_disk.go b/pkg/replica/diff_disk.go index 4be04ff13..1406dfb19 100644 --- a/pkg/replica/diff_disk.go +++ b/pkg/replica/diff_disk.go @@ -271,7 +271,7 @@ func (d *diffDisk) lookup(sector int64) (byte, error) { for i := len(d.files) - 1; i > 1; i-- { e, errno := fibmap.Fiemap(d.files[i].Fd(), uint64(sector*d.sectorSize), uint64(d.sectorSize), 1) if errno != 0 { - return 0, fmt.Errorf(errno.Error()) + return 0, fmt.Errorf("%v", errno) } if len(e) > 0 { d.location[sector] = byte(i) diff --git a/pkg/replica/rpc/server.go b/pkg/replica/rpc/server.go index 5b3f87642..67bf58c28 100644 --- a/pkg/replica/rpc/server.go +++ b/pkg/replica/rpc/server.go @@ -188,7 +188,7 @@ func (rs *ReplicaServer) ReplicaExpand(ctx context.Context, req *enginerpc.Repli errWithCode = types.NewError(types.ErrorCodeFunctionFailedWithoutRollback, err.Error(), "") } - return nil, status.Errorf(codes.Internal, errWithCode.ToJSONString()) + return nil, status.Errorf(codes.Internal, "%s", errWithCode.ToJSONString()) } return &enginerpc.ReplicaExpandResponse{Replica: rs.getReplica()}, nil