Fix CA init error code

This commit is contained in:
freddygv 2022-10-10 13:56:38 -06:00
parent 472a8e82dc
commit 96fdd3728a
1 changed files with 1 additions and 1 deletions

View File

@ -709,7 +709,7 @@ func getTrustDomain(store StateStore, logger hclog.Logger) (string, error) {
return "", grpcstatus.Error(codes.Internal, "failed to read Connect CA Config")
case cfg == nil:
logger.Warn("cannot begin stream because Connect CA is not yet initialized")
return "", grpcstatus.Error(codes.FailedPrecondition, "Connect CA is not yet initialized")
return "", grpcstatus.Error(codes.Unavailable, "Connect CA is not yet initialized")
}
return connect.SpiffeIDSigningForCluster(cfg.ClusterID).Host(), nil
}