iotaledger / iotaledger/notarization

[Task]: Refactor Error handling in Rust/TS

Open
#105 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
5
Forks
7
Avg merge
10h 34m
Merged PRs (30d)
11

Description

### Feature description

Each fallible operation should have its own error type tailored to model it.
Deprecate (or remove) the old `Error` type and refactor error-handling for each fallible operation our library provides.

Write errors that leverage `std::error::Error` functionalities and ensure they are as modular, correct, and informative as possible without exposing any unnecessary foreign type. See [Sabrina's blog post](https://sabrinajewson.org/blog/errors) for directions.

### Motivation

A single huge `Error` enum for the whole crate doesn't cut it and it hinders the composability of our library's code, besides making it almost impossible for our users to recover from those errors.

### Requirements

Refactor the `Error` type into more modular errors

### Open questions

_No response_

### Are you planning to do it yourself in a pull request?

Yes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.