MCPcopy
hub / github.com/larksuite/cli / IsTyped

Function IsTyped

errs/predicates.go:94–97  ·  view source on GitHub ↗

IsTyped reports whether err is or wraps any of the typed *errs.* errors in this package (i.e. implements the TypedError interface). Used by call sites that need to pass already-classified errors through unchanged instead of blanket-rewrapping them as a different category.

(err error)

Source from the content-addressed store, hash-verified

92// sites that need to pass already-classified errors through unchanged
93// instead of blanket-rewrapping them as a different category.
94func IsTyped(err error) bool {
95 var t TypedError
96 return errors.As(err, &t)
97}

Calls 1

AsMethod · 0.80