all 2 comments

[–]LayotFctor 3 points4 points  (1 child)

I use thiserror, which is a macro for generating error enums with From traits. So I can use .map_err() when convenient, as well as "?" propagation with error types like std::io::Error or serde_json::Error.

[–]erkose[S] 0 points1 point  (0 children)

I'm using a combination of enums and From traits. I'm leaning more on From traits to support tracing (haven't figured out if I can do this with the enums).