Skip to content

sip: wrapTransportError flattens the cause #321

Description

@Mliviu79

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions