diff --git a/agent/consul/state/acl.go b/agent/consul/state/acl.go index d9e5953b2f..55b5926607 100644 --- a/agent/consul/state/acl.go +++ b/agent/consul/state/acl.go @@ -777,7 +777,9 @@ func (s *Store) ACLPolicyBatchDelete(idx uint64, policyIDs []string) error { defer tx.Abort() for _, policyID := range policyIDs { - s.aclPolicyDeleteTxn(tx, idx, policyID, "id") + if err := s.aclPolicyDeleteTxn(tx, idx, policyID, "id"); err != nil { + return err + } } if err := indexUpdateMaxTxn(tx, idx, "acl-policies"); err != nil { diff --git a/agent/consul/state/autopilot.go b/agent/consul/state/autopilot.go index 1f94d8888c..7c03dd7ad9 100644 --- a/agent/consul/state/autopilot.go +++ b/agent/consul/state/autopilot.go @@ -77,7 +77,9 @@ func (s *Store) AutopilotSetConfig(idx uint64, config *autopilot.Config) error { tx := s.db.Txn(true) defer tx.Abort() - s.autopilotSetConfigTxn(idx, tx, config) + if err := s.autopilotSetConfigTxn(idx, tx, config); err != nil { + return err + } tx.Commit() return nil @@ -104,7 +106,9 @@ func (s *Store) AutopilotCASConfig(idx, cidx uint64, config *autopilot.Config) ( return false, nil } - s.autopilotSetConfigTxn(idx, tx, config) + if err := s.autopilotSetConfigTxn(idx, tx, config); err != nil { + return false, err + } tx.Commit() return true, nil