Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client/v3/retry_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,11 @@
func contextErrToGRPCErr(err error) error {
switch {
case errors.Is(err, context.DeadlineExceeded):
return status.Errorf(codes.DeadlineExceeded, err.Error())
return status.Error(codes.DeadlineExceeded, err.Error())
case errors.Is(err, context.Canceled):
return status.Errorf(codes.Canceled, err.Error())
return status.Error(codes.Canceled, err.Error())
default:
return status.Errorf(codes.Unknown, err.Error())
return status.Error(codes.Unknown, err.Error())

Check warning on line 358 in client/v3/retry_interceptor.go

View check run for this annotation

Codecov / codecov/patch

client/v3/retry_interceptor.go#L358

Added line #L358 was not covered by tests
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/v3_lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ func acquireLeaseAndKey(clus *integration.Cluster, key string) (int64, error) {
return 0, err
}
if lresp.Error != "" {
return 0, fmt.Errorf(lresp.Error)
return 0, errors.New(lresp.Error)
}
// attach to key
put := &pb.PutRequest{Key: []byte(key), Lease: lresp.ID}
Expand Down
Loading