
Pass JSON data to Golang error using Eris package - sum2000
https://github.com/rotisserie/eris/tree/v0.4.0
======
sum2000
We created Eris for error handling in our Go services

If you're a Go developer, there's a very high chance you've seen a pkg/errors
stack trace. We've used it in all of our Go microservices until recently, and
while it has definitely improved the debugging process, we've always wished
some things could be better. Specifically, we wanted more readable stack
traces in our JSON logs and were disappointed that trace formatting is rigid
in pkg/errors. For better or worse, we use global errors extensively and
noticed that their stack traces are totally useless (containing lines like
"runtime.doInit", etc). It's also clear that pkg/errors is in maintenance mode
even though Go 1.13 missed the mark on error handling in our opinion.

Switching over to it in our production code seemed like a risk at first, but
there were enough similarities to the pkg/errors interface that we decided to
go for it. The feature that worked well for us was flexible error formatting
to JSON, which takes most of the guesswork out of finding and fixing bugs. And
then, later on, support for global errors was added to make their stack traces
useful. We also recently started using Sentry for error monitoring and added
that to Eris.

Overall, we're already seeing a benefit in terms of time saved while
debugging, and we're glad we made the switch. Has anyone else found good
alternatives to pkg/errors?

------
handydandyrandy
Our developers are using this library in production and have to say that it
solves most of our needs. If it had support for As() method it would be
great!!

