Skip to content

Export function that builds error chain from wrapped errors #291

@avgeorge

Description

@avgeorge

Summary

Please export a function that can build an error chain from a wrapped error.

Motivation

This package has logic that builds an error chain for an event from errors that are wrapped using several different error packages. However, this logic is in a function that builds an event and submits it immediately. I would like to be able to use this logic so that I can make further changes to the event before submitting it.

Additional Context

The simplest way to achieve this would be to export Client.eventFromException which builds an event from an error. The function doesn't depend on the client receiver so it's trivial to change it to a standalone function.
It might be better to create a function with a different signature though, e.g. func ExtractErrorChain(err error) []Exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions