Summary
sdk/src/network/rpc.service.ts makes direct calls to the Soroban RPC. Transient network failures (503, timeout) cause immediate exceptions that propagate to the UI as errors.
What to do
- Wrap RPC calls in
sdk/src/utils/retry.ts (which already exists) with:
- Max 3 retries.
- Exponential backoff starting at 300 ms.
- Retry only on network errors and 5xx responses — do NOT retry 4xx (user/contract errors).
- Add a
SOROBAN_RPC_MAX_RETRIES and SOROBAN_RPC_BASE_DELAY_MS config to network.config.ts.
- Write a test that simulates 2 transient failures followed by a success and asserts the result is returned.
Acceptance criteria
- A transient RPC failure is retried up to 3 times before propagating as an error.
- 4xx responses are not retried.
Summary
sdk/src/network/rpc.service.tsmakes direct calls to the Soroban RPC. Transient network failures (503, timeout) cause immediate exceptions that propagate to the UI as errors.What to do
sdk/src/utils/retry.ts(which already exists) with:SOROBAN_RPC_MAX_RETRIESandSOROBAN_RPC_BASE_DELAY_MSconfig tonetwork.config.ts.Acceptance criteria