Skip to content

Commit

Permalink
feat: add error for peer invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
iamKunalGupta committed Apr 25, 2024
1 parent ce5ace7 commit 218ea1b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions flow/cmd/validate_peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ func (h *FlowRequestHandler) ValidatePeer(

conn, err := connectors.GetConnector(ctx, req.Peer)
if err != nil {
displayErr := fmt.Sprintf("%s peer %s was invalidated: %v", req.Peer.Type, req.Peer.Name, err)
h.alerter.LogNonFlowWarning(ctx, telemetry.CreatePeer, req.Peer.Name, displayErr)
return &protos.ValidatePeerResponse{
Status: protos.ValidatePeerStatus_INVALID,
Message: fmt.Sprintf("%s peer %s was invalidated: %s",
req.Peer.Type, req.Peer.Name, err),
Status: protos.ValidatePeerStatus_INVALID,
Message: displayErr,
}, nil
}

Expand Down

0 comments on commit 218ea1b

Please sign in to comment.