I've run into similar issues and found that the `thiserror` crate (https://crates.io/crates/thiserror) combined w/ anyhow makes a lot of that pain go away
Don't use `anyhow` for libraries, though. You want to provide your consumers the ability to `match`.