MCPcopy Index your code
hub / github.com/docker/docker-agent / isClassified

Function isClassified

pkg/tools/lifecycle/classify.go:48–59  ·  view source on GitHub ↗

isClassified reports whether err already wraps one of the package sentinels. Used to make Classify idempotent.

(err error)

Source from the content-addressed store, hash-verified

46// isClassified reports whether err already wraps one of the package
47// sentinels. Used to make Classify idempotent.
48func isClassified(err error) bool {
49 for _, s := range []error{
50 ErrServerUnavailable, ErrServerCrashed, ErrInitTimeout,
51 ErrInitNotification, ErrCapabilityMissing, ErrAuthRequired,
52 ErrSessionMissing, ErrTransport,
53 } {
54 if errors.Is(err, s) {
55 return true
56 }
57 }
58 return false
59}
60
61// classifyByMessage matches well-known substrings emitted by upstream SDKs
62// that wrap errors with %v (dropping the chain). Returns err unchanged

Callers 1

ClassifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected