wrapTransportError renders the cause with %s:
return fmt.Errorf("%s. %w", err.Error(), ErrTransactionTransport)
so only ErrTransactionTransport stays matchable. The underlying error — the actual write or dial failure — is reduced to text and cannot be reached with errors.Is or errors.As.
Fix: wrap the cause with %w instead. Matching on ErrTransactionTransport is unaffected.
wrapTransportError renders the cause with %s:
so only ErrTransactionTransport stays matchable. The underlying error — the actual write or dial failure — is reduced to text and cannot be reached with errors.Is or errors.As.
Fix: wrap the cause with %w instead. Matching on ErrTransactionTransport is unaffected.