Skip to content

Commit bd81dc0

Browse files
committed
Handle commit errors in Forward response
1 parent cb1d5db commit bd81dc0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adapter/internal.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ func (i *Internal) Forward(_ context.Context, req *pb.ForwardRequest) (*pb.Forwa
3434

3535
r, err := i.transactionManager.Commit(req.Requests)
3636
if err != nil {
37-
return nil, errors.WithStack(err)
37+
return &pb.ForwardResponse{
38+
Success: false,
39+
CommitIndex: 0,
40+
}, errors.WithStack(err)
3841
}
3942

4043
return &pb.ForwardResponse{

0 commit comments

Comments
 (0)