-
Notifications
You must be signed in to change notification settings - Fork 242
Description
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