follow-up: investigate alternate forms of error handling for web context
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 21
- 平均マージ
- 12時間 14分
- マージ済み PR(30日)
- 41
説明
After 0xMiden/miden-client#813 the `set_once()` call was removed as it no longer worked. The problem it fixed was that rust panics hanged the web client tests instead of instantly failing.
We should look into new ways of dealing with rust panics in wasm context. @igamigo proposed [`unwrap_throw`](https://rustwasm.github.io/wasm-bindgen/api/wasm_bindgen/trait.UnwrapThrowExt.html) which might fix the issue by converting the panic into a js error which can be then handled.
Also, we can investigate if there are better ways of printing the js errors once they get catched in Rust (look in https://github.com/0xPolygonMiden/miden-client/pull/813#discussion_r2017639259 for context).
コントリビューションガイド
調査の方向性
Look at the wasm-bindgen UnwrapThrowExt trait to convert Rust panics to JS errors. Examine the linked PR #813 discussion for context on error printing. Start by understanding the web client test setup and how panics currently behave. Determine how to integrate unwrap_throw and improve error handling in the web context.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust, typescript, wasm
- 領域
- devtools, web-dev
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100