Address PR comments.

This commit is contained in:
Derek Menteer 2022-10-13 13:27:21 -05:00 committed by Derek Menteer
parent cc0a05ffa0
commit ff01c11672
1 changed files with 3 additions and 1 deletions

View File

@ -486,7 +486,9 @@ func (s *Server) validatePeeringLocality(token *structs.PeeringToken) error {
return fmt.Errorf("failed to fetch TLS materials: %w", err)
}
if serverName == token.ServerName {
return fmt.Errorf("cannot create a peering within the same cluster %q", serverName)
return fmt.Errorf(
"cannot create a peering within the same cluster %q. Refer to the `exported-services` documentation if you want to export between partitions without peering",
serverName)
}
return nil
}