Found while carrying error codes through to the page for #274. Deliberately not fixed there: that unit is confined to what src/content/inpage.js surfaces, and this is in what the background produces.
No code. EIP-1193 defines 4200 ("Unsupported Method") for exactly this, and the same handler already attaches 4001, 4100 and 4902 elsewhere, so the omission reads as an oversight rather than a choice.
With #274 landed the provider passes any code through verbatim, so adding code: 4200 at that one site is the whole fix — nothing in src/content/inpage.js needs to change for it to reach the page.
Why it matters: a dApp probing for an optional method (a wallet_* capability check, a fallback chain) gets an uncoded error it cannot classify, so it cannot tell "this wallet does not implement that" from "that call failed" and cannot fall back cleanly.
Other code-less error paths in the same handler are a separate question and are not in scope here: "No accounts available", a failed proxy RPC, a failed transaction population, and an address that changed mid-preparation are all internal failures with no obvious EIP-1193 code, whereas 4200 is defined for precisely this case.
Definition of done
handleRpc() returns code: 4200 for a method it does not implement, with the message unchanged.
A test asserts the code reaches the page for an unimplemented method.
make check passes.
Found while carrying error codes through to the page for https://git.eeqj.de/sneak/AutistMask/issues/274. Deliberately not fixed there: that unit is confined to what `src/content/inpage.js` surfaces, and this is in what the background produces.
`handleRpc()` in `src/background/index.js` ends with:
```js
return { error: { message: "Unsupported method: " + method } };
```
No code. EIP-1193 defines `4200` ("Unsupported Method") for exactly this, and the same handler already attaches `4001`, `4100` and `4902` elsewhere, so the omission reads as an oversight rather than a choice.
With https://git.eeqj.de/sneak/AutistMask/issues/274 landed the provider passes any code through verbatim, so adding `code: 4200` at that one site is the whole fix — nothing in `src/content/inpage.js` needs to change for it to reach the page.
Why it matters: a dApp probing for an optional method (a `wallet_*` capability check, a fallback chain) gets an uncoded error it cannot classify, so it cannot tell "this wallet does not implement that" from "that call failed" and cannot fall back cleanly.
Other code-less error paths in the same handler are a separate question and are not in scope here: "No accounts available", a failed proxy RPC, a failed transaction population, and an address that changed mid-preparation are all internal failures with no obvious EIP-1193 code, whereas `4200` is defined for precisely this case.
## Definition of done
- [ ] `handleRpc()` returns `code: 4200` for a method it does not implement, with the message unchanged.
- [ ] A test asserts the code reaches the page for an unimplemented method.
- [ ] `make check` passes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found while carrying error codes through to the page for #274. Deliberately not fixed there: that unit is confined to what
src/content/inpage.jssurfaces, and this is in what the background produces.handleRpc()insrc/background/index.jsends with:No code. EIP-1193 defines
4200("Unsupported Method") for exactly this, and the same handler already attaches4001,4100and4902elsewhere, so the omission reads as an oversight rather than a choice.With #274 landed the provider passes any code through verbatim, so adding
code: 4200at that one site is the whole fix — nothing insrc/content/inpage.jsneeds to change for it to reach the page.Why it matters: a dApp probing for an optional method (a
wallet_*capability check, a fallback chain) gets an uncoded error it cannot classify, so it cannot tell "this wallet does not implement that" from "that call failed" and cannot fall back cleanly.Other code-less error paths in the same handler are a separate question and are not in scope here: "No accounts available", a failed proxy RPC, a failed transaction population, and an address that changed mid-preparation are all internal failures with no obvious EIP-1193 code, whereas
4200is defined for precisely this case.Definition of done
handleRpc()returnscode: 4200for a method it does not implement, with the message unchanged.make checkpasses.