Skip to content

Wrap does not wrap as expected for external errors #32

@a-palchikov

Description

@a-palchikov

Wrap's current behavior is threading the captured instance of TraceErr (or any other implementation of the Error interface) all the way back to the caller.
This is fine if the error originated and is handled on the same call path.

However, when the wrapped error is of external nature (for instance, deserialized from a remote HTTP request), it is replacing the current call stack with a foreign one and the context is lost. In this case, the expected behavior is that both stacks are preserved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions