8 Commits

Author SHA1 Message Date
Eric
933103ca6d
Refactor error bubbling
Ensure that all errors bubble to the main `convertError` proc.

Add websockets mocks and tests.

Formatting updates via nph.
2025-07-08 12:10:02 +10:00
Eric
f480431ccc
WIP commit for websockets transport error tests 2025-07-03 09:55:44 +10:00
Eric
68e36768d0
Add test for connection timed out 2025-07-02 13:15:42 +10:00
Eric
e849795d96
Rename errors to be more http-specific 2025-05-28 19:26:10 +10:00
Eric
be192c880e
Add http error conversion tests for failed connections 2025-05-28 16:18:10 +10:00
Eric
af35395ace
Convert retryable RPC/HTTP errors to RpcNetworkError type in ethers
Converts specific errors to RpcNetworkError, which can be bubbled to applications at a higher level and retried on the network (eg with exponential backoff) until resolved or timed out.
2025-05-27 18:03:19 +10:00
Eric
6523e70eaf
fix: items(JsonNode) symbol not found (#87)
* chore: export subscriptions

This has a knock-on effect of nim-serde not being imported into subscriptions when JsonRpcProvider.new is called from a consumer that does not export nim-serde.

* import/export serde

* Replace all instances of std/json with pkg/serde
2024-10-28 14:06:20 +11:00
Mark Spanbroek
875900b493 jsonrpc: extract error data from JSON RPC error
Inspired by 'spelunk' from ethers.js:
f97b92bbb1/packages/providers/src.ts/json-rpc-provider.ts (L25)
2024-05-21 13:19:24 +02:00