evalphobia / logrus_sentry

sentry hook for logrus
MIT License
194 stars 78 forks source link

When errors.Cause returns nil, use the original error value instead #61

Closed tanel closed 6 years ago

tanel commented 6 years ago

When stack trace was enabled, we saw panics on line

exc := raven.NewException(errors.Cause(err), currentStacktrace)

We believe it is because errors.Cause(err) returns nil, if the error was created using package github.com/juju/errors, not github.com/pkg/errors

evalphobia commented 6 years ago

Thanks! 😋

Note: https://github.com/evalphobia/logrus_sentry/releases/tag/v0.4.6

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.4%) to 82.667% when pulling 5064c4840f54e2589ca9f91e936792c2bb83b5e2 on wallester:bugfix/use-original-error-when-errors-cause-returns-nil into 57846a82817615f185b10cc40de8dc60c1ca5ae1 on evalphobia:master.