MCPcopy
hub / github.com/kubernetes-sigs/controller-runtime / IgnoreNotFound

Function IgnoreNotFound

pkg/client/interfaces.go:214–219  ·  view source on GitHub ↗

IgnoreNotFound returns nil on NotFound errors. All other values that are not NotFound errors or nil are returned unmodified.

(err error)

Source from the content-addressed store, hash-verified

212// IgnoreNotFound returns nil on NotFound errors.
213// All other values that are not NotFound errors or nil are returned unmodified.
214func IgnoreNotFound(err error) error {
215 if apierrors.IsNotFound(err) {
216 return nil
217 }
218 return err
219}
220
221// IgnoreAlreadyExists returns nil on AlreadyExists errors.
222// All other values that are not AlreadyExists errors or nil are returned unmodified.

Callers 3

client_test.goFile · 0.92
ReconcileMethod · 0.92

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…