MCPcopy Create free account
hub / github.com/jetify-com/devbox / Extract

Function Extract

internal/boxcli/usererr/usererr.go:78–84  ·  view source on GitHub ↗

Extract unwraps and returns the user error if it exists.

(err error)

Source from the content-addressed store, hash-verified

76
77// Extract unwraps and returns the user error if it exists.
78func Extract(err error) (error, bool) { // nolint: revive
79 c := &combined{}
80 if errors.As(err, &c) {
81 return c, true
82 }
83 return nil, false
84}
85
86// ShouldLogError returns true if the it's a combined error specifically marked to be logged
87// or if it's not an ExitError.

Callers 2

postRunMethod · 0.92
hasUserMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected