Skip to content

Commit

Permalink
Add NS to error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
freddygv committed Jun 13, 2022
1 parent ae5920e commit c96847c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions agent/rpc/peering/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ func (s *Service) handleUpdateService(
PeerName: peerName,
})
if err != nil {
ident := fmt.Sprintf("partition:%s/peer:%s/node:%s/service_id:%s", csn.Service.PartitionOrDefault(), peerName, csn.Node.Node, csn.Service.ID)
ident := fmt.Sprintf("partition:%s/peer:%s/node:%s/ns:%s/service_id:%s",
csn.Service.PartitionOrDefault(), peerName, csn.Node.Node, csn.Service.NamespaceOrDefault(), csn.Service.ID)
return fmt.Errorf("failed to deregister service %q: %w", ident, err)
}

Expand Down Expand Up @@ -375,7 +376,8 @@ func (s *Service) handleUpdateService(
PeerName: peerName,
})
if err != nil {
ident := fmt.Sprintf("partition:%s/peer:%s/node:%s/check_id:%s", chk.PartitionOrDefault(), peerName, chk.Node, chk.CheckID)
ident := fmt.Sprintf("partition:%s/peer:%s/node:%s/ns:%s/check_id:%s",
chk.PartitionOrDefault(), peerName, chk.Node, chk.NamespaceOrDefault(), chk.CheckID)
return fmt.Errorf("failed to deregister check %q: %w", ident, err)
}
}
Expand Down

0 comments on commit c96847c

Please sign in to comment.