An error message is useful for a person, but callers often need a stable way to recognize a failure. Wrapping with fmt.Errorf and the percent-w verb preserves the original error for errors.Is and errors.As. Comparing strings cannot reliably substitute for that identity, and formatting with percent-v keeps only the text. Define a sentinel for a shared condition or a concrete type when the caller needs structured details. These tasks build small error boundaries around fictional lookups. Successful values remain successful, including zero. Return the underlying error when a wrapper adds no useful context. The checks inspect identity and typed fields as well as text, so an error that merely looks right will not satisfy the contract.
A caller can recognize the original error.