You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BrowserDb (the browser feature, published as @minigraf/browser) rejects with the error's top-level message only, without the structured code that every other API carries:
awaitdb.execute('(nosuchcommand [])')// rejects with "Unknown command: nosuchcommand"// the native API, the WASI REPL and the other bindings report "[PRS-…] Unknown command: nosuchcommand"
Cause: src/browser/mod.rs converts errors with JsValue::from_str(&e.to_string()) (12 places on main, 15 on v3), which formats the anyhow::Error without its code. Only the IndexedDB flush path goes through MinigrafError::from(e). Since #277 (v2.0.0), every error is supposed to carry its code (docs/ERROR_REFERENCE.md).
Fix: route every conversion through one helper, MinigrafError::from(e).to_string(), and add a wasm_bindgen_test that checks for the [XXX-NNN] prefix. Fix it on v3 first, then backport to main for v2.0.9.
Found by the minigraf-wasm consumer test (binding consumer tests plan, docs/superpowers/plans/2026-10-20-binding-consumer-tests.md).
Activity
test(browser): pin the exact error codes in the #673 test
test(browser): pin the exact error codes in the #673 test
fix(browser): BrowserDb errors carry their error code (#673) — backpo…
Merge pull request #675 from project-minigraf/fix/673-browser-error-c…
release: v2.0.9
adityamukho commentedon Oct 21, 2026
Fixed in v2.0.9 (#677) and on v3 (#675).