0xMiden / 0xMiden/web-sdk

follow-up: investigate alternate forms of error handling for web context

オープン
#79 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。