Open marioiordanov opened 1 year ago
Please kindly assign this task to me. Thanks
Hello @ivpavici @marioiordanov I would love to be part of this effort! 👷🏽♂️, thanks (I am in OD Hack telegram, ready to start on Monday 🫡)
I started learning Rust recently and I think this issue will give me a head start working with errors in Rust. In order to tackle this issue, I would scan through the codebase for anywhere errors are being used and replace it with starknet-rs generated errors.
~~@vibenedict please report frequently, if no progress si made during ~2 days we will assign @PabloVillaplana ~~
edit: ok, so we can have only one assignee per issue, so I switched up for this one!
@marioiordanov @ivpavici @FabijanC Do we have more context or can we update the issue description a little? 🤔
hello! The issue means if we can potentially remove some error handling logic from our devnet code, and instead use the error handling logic from https://github.com/xJonathanLEI/starknet-rs Maybe it is not possible, so some investigation and testing is needed from your side!
Hello
I was currently reviewing the starknet-rs library that uses thiserror, they do not handle as such an error handling that we can export in our code, at least I think so.
Could someone give me some light to continue investigating? 👀
I am unassign me from this issue to give chance to another Dev
StarknetDevnetError
to ApiError
is good candidate for refactoring too. Possible solution is to implement From
trait for ApiError
with the most common StarknetDevnetError
-> ApiError
mappings. If there are differences in some of the methods, mapping will be done in the method.
For example in general:
StarknetDevnetError::NoStateAtBlock => ApiError::NoStateAtBlock
but in starknet_devnetStarknetDevnetError::NoStateAtBlock => ApiError::BlockNotFound
use starknet-rs generated errors