@@ -13,7 +13,6 @@ import (
1313 "github.com/PeerDB-io/peerdb/flow/generated/protos"
1414 "github.com/PeerDB-io/peerdb/flow/internal"
1515 "github.com/PeerDB-io/peerdb/flow/shared/exceptions"
16- "github.com/PeerDB-io/peerdb/flow/shared/telemetry"
1716)
1817
1918var CustomColumnTypeRegex = regexp .MustCompile (`^$|^[a-zA-Z][a-zA-Z0-9(),]*$` )
@@ -40,9 +39,7 @@ func (h *FlowRequestHandler) ValidateCDCMirror(
4039 }
4140
4241 if mirrorExists {
43- displayErr := fmt .Errorf ("mirror with name %s already exists" , req .ConnectionConfigs .FlowJobName )
44- h .alerter .LogNonFlowWarning (ctx , telemetry .CreateMirror , req .ConnectionConfigs .FlowJobName , displayErr .Error ())
45- return nil , displayErr
42+ return nil , fmt .Errorf ("mirror with name %s already exists" , req .ConnectionConfigs .FlowJobName )
4643 }
4744 }
4845
@@ -66,18 +63,11 @@ func (h *FlowRequestHandler) ValidateCDCMirror(
6663 if errors .Is (err , errors .ErrUnsupported ) {
6764 return nil , errors .New ("connector is not a supported source type" )
6865 }
69- err := fmt .Errorf ("failed to create source connector: %w" , err )
70- h .alerter .LogNonFlowWarning (ctx , telemetry .CreateMirror , req .ConnectionConfigs .FlowJobName ,
71- err .Error (),
72- )
73- return nil , err
66+ return nil , fmt .Errorf ("failed to create source connector: %w" , err )
7467 }
7568 defer connectors .CloseConnector (ctx , srcConn )
7669
7770 if err := srcConn .ValidateMirrorSource (ctx , req .ConnectionConfigs ); err != nil {
78- h .alerter .LogNonFlowWarning (ctx , telemetry .CreateMirror , req .ConnectionConfigs .FlowJobName ,
79- err .Error (),
80- )
8171 return nil , fmt .Errorf ("failed to validate source connector %s: %w" , req .ConnectionConfigs .SourceName , err )
8272 }
8373
@@ -88,11 +78,7 @@ func (h *FlowRequestHandler) ValidateCDCMirror(
8878 if errors .Is (err , errors .ErrUnsupported ) {
8979 return & protos.ValidateCDCMirrorResponse {}, nil
9080 }
91- err := fmt .Errorf ("failed to create destination connector: %w" , err )
92- h .alerter .LogNonFlowWarning (ctx , telemetry .CreateMirror , req .ConnectionConfigs .FlowJobName ,
93- err .Error (),
94- )
95- return nil , err
81+ return nil , fmt .Errorf ("failed to create destination connector: %w" , err )
9682 }
9783 defer connectors .CloseConnector (ctx , dstConn )
9884
@@ -103,9 +89,6 @@ func (h *FlowRequestHandler) ValidateCDCMirror(
10389 }
10490
10591 if err := dstConn .ValidateMirrorDestination (ctx , req .ConnectionConfigs , res ); err != nil {
106- h .alerter .LogNonFlowWarning (ctx , telemetry .CreateMirror , req .ConnectionConfigs .FlowJobName ,
107- err .Error (),
108- )
10992 return nil , err
11093 }
11194
0 commit comments