check error when `raftApplyMsgpack`

This commit is contained in:
Dhia Ayachi 2021-07-12 10:37:25 -04:00 committed by Daniel Nephin
parent 34c8585b29
commit 3eac4ffda4
2 changed files with 4 additions and 2 deletions

View File

@ -12,9 +12,8 @@ import (
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/acmpca"
"github.com/mitchellh/mapstructure"
"github.com/hashicorp/go-hclog"
"github.com/mitchellh/mapstructure"
"github.com/hashicorp/consul/agent/connect"
"github.com/hashicorp/consul/agent/structs"

View File

@ -105,6 +105,9 @@ func (c *caDelegateWithState) ApplyCALeafRequest() (uint64, error) {
Datacenter: c.Server.config.Datacenter,
}
resp, err := c.Server.raftApplyMsgpack(structs.ConnectCALeafRequestType|structs.IgnoreUnknownTypeFlag, &req)
if err != nil {
return 0, err
}
modIdx, ok := resp.(uint64)
if !ok {