Reporting Errors in Production: The Type/Stack Conflict

What Reasonable Reporting Should Look Like

pkg/errors

The StackTrace/Type conflict

1) Create a new error

2) Wrap a custom error

3) Wrap the error from the db

Compromise 1: Keep the Stack Simple, Complicate the Type

Compromise 2: Keep the Type Simple, Put Extra Work For the Stack Trace

What’s next:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store