iotaledger / iotaledger/product-core
Refactor error-handling in TS Bindings
Open
dx-improvement
enhancement
- Dominant language
- Rust
- Stars
- 0
- Forks
- 2
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
### Feature description
Map each Rust's error type into a TS class that extends `Error` where Rust's `Display` implementation is used in TS `Error.message` and Rust's source becomes `Error.cause` in TS.
In the actual Rust's bindings to TS import the TS Error through the use of an extern block and implement a conversion between TS <-> Rust error type.
### Motivation
Current error-handling is worthless. Most of our errors can only logged out in a desperate attempt for users to understand what isn't working.
Contributor guide
Assessment
This issue has not been assessed yet.