MCPcopy
hub / github.com/docker/docker-agent / IsPermanent

Function IsPermanent

pkg/tools/lifecycle/classify.go:107–109  ·  view source on GitHub ↗

IsPermanent reports whether err wraps a sentinel that must NOT be retried (currently ErrCapabilityMissing and ErrAuthRequired).

(err error)

Source from the content-addressed store, hash-verified

105// IsPermanent reports whether err wraps a sentinel that must NOT be retried
106// (currently ErrCapabilityMissing and ErrAuthRequired).
107func IsPermanent(err error) bool {
108 return errors.Is(err, ErrCapabilityMissing) || errors.Is(err, ErrAuthRequired)
109}
110
111// wrap returns an error satisfying errors.Is for both sentinel and
112// underlying, using Go 1.20+ multi-%w support.

Callers 4

TestIsPermanentFunction · 0.92
shouldRestartMethod · 0.85
tryRestartMethod · 0.85

Calls

no outgoing calls

Tested by 2

TestIsPermanentFunction · 0.74