Skip to content

Commit 605a498

Browse files
committed
replaced with errors.Wrap and fixed a logging statement
1 parent 70fb5c4 commit 605a498

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

npm/pkg/dataplane/dataplane_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ func (dp *DataPlane) getLocalPodEndpoints() ([]*hcn.HostComputeEndpoint, error)
352352
metrics.RecordListEndpointsLatency(timer)
353353
if err != nil {
354354
metrics.IncListEndpointsFailures()
355-
return nil, npmerrors.SimpleErrorWrapper("failed to get local pod endpoints", err)
355+
return nil, errors.Wrap(err, "failed to get local pod endpoints")
356356
}
357357

358358
if dp.EnableNPMLite {
@@ -361,7 +361,7 @@ func (dp *DataPlane) getLocalPodEndpoints() ([]*hcn.HostComputeEndpoint, error)
361361
metrics.RecordListEndpointsLatency(timer)
362362
if errL1vh != nil {
363363
metrics.IncListEndpointsFailures()
364-
return nil, npmerrors.SimpleErrorWrapper("failed to get local pod endpoints in L1VH", err)
364+
return nil, errors.Wrap(errL1vh, "failed to get local pod endpoints in L1VH")
365365
}
366366
endpoints = append(endpoints, endpointsAttached...)
367367
}

0 commit comments

Comments
 (0)