Skip to content

Commit

Permalink
fix: check error on apply to avoid panics
Browse files Browse the repository at this point in the history
  • Loading branch information
moogacs committed Apr 16, 2024
1 parent 1cb298b commit 226f647
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cluster/store/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ func (s *Service) Execute(req *cmd.ApplyRequest) (uint64, error) {
return 0, ErrLeaderNotFound
}
resp, err := s.cl.Apply(leader, req)
if err != nil {
return 0, err
}

return resp.Version, err
}

Expand Down

0 comments on commit 226f647

Please sign in to comment.