Investigate returning `js_sys::Error` on the web client
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 21
- Avg merge
- 12h 14m
- Merged PRs (30d)
- 41
Description
As of https://github.com/0xPolygonMiden/miden-client/pull/786, we added more context to the error messages returned as `JsValue`s by concatenating source errors together. @dagarcia7 suggested looking into returning `js_sys::Error` as a future improvement, adding more context by returning Javascript-native errors.
Reference: https://github.com/0xPolygonMiden/miden-client/pull/786#pullrequestreview-2696966230
Contributor guide
Research direction
Look at the error handling in the web client, likely in the WASM bindings where JsValue is returned. Review PR #786 to understand the current concatenation approach. Investigate js_sys::Error API to see how to convert existing errors into native JavaScript errors. Test changes in a browser environment to ensure errors are properly thrown and catchable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, typescript, wasm
- Domain
- developer-experience, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100