Re:Eris – A better way to handle, trace, and log errors in Go
by onei on Thursday December 26, 2019 @04:32AM
(#21882775)
You can use the Error trait [1] from the stdlib, implement it for your error types and then just use the trait in your Result. That way you don't need the types to match and you can convert between then as needed while adding the previous errors to the chain.
1. https://doc.rust-lang.org/std/error/trait.Error.html