iotaledger / iotaledger/identity
Error handling overhaul
- Dominant language
- Rust
- Stars
- 346
- Forks
- 100
- Avg merge
- 13h 41m
- Merged PRs (30d)
- 2
Description
## Description
Rework all of our crates' error types and handling techniques. Avoid the use of a single big enum-based error type per crate or module and instead model errors for each unit of fallibility. Make sure to implement `std::error::Error::source` whenever possible as well as annotating stuff with `#[non_exaustive]` to allow for the extensibility of our error types.
## Motivation
The current error handling state in our crates is downright bad, error messages are of little use, the types most of the times don't have any additional information useful for recovering from them, sources are almost never used.
## Resources
Here's a [blog post](https://sabrinajewson.org/blog/errors) that describes in details how error handling should be done for a library.
> _**UMR1352's note:**_ This is simply my opinion, if other maintainers have any other suggestion or comment on this approach, let's discuss it
Contributor guide
Assessment
This issue has not been assessed yet.