• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / worlds-content-server / 27793704131
89%
main: 89%

Build:
Build:
LAST BUILD BRANCH: refactor/remove-node-fetch-from-runtime
DEFAULT BRANCH: main
Ran 18 Jun 2026 10:42PM UTC
Jobs 1
Files 108
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Jun 2026 10:39PM UTC coverage: 89.049% (-0.4%) from 89.483%
27793704131

Pull #496

github

LautaroPetaccio
fix: prevent RPC premature-close from crashing the process

A FetchError "Invalid response body ...: Premature close"
(ERR_STREAM_PREMATURE_CLOSE) from the RPC endpoint was taking down the
whole server.

Root cause: eth-connect's HTTPProvider consumes the response body with
`await res.json()` inside its `fetch(...).then(onFulfilled)` callback. When
the upstream RPC closes the connection mid-body, node-fetch rejects that
body read. Because the rejection happens in the fulfillment handler (not the
`.then(_, onRejected)` handler) and is never `.catch()`ed, it escapes as an
unhandled promise rejection. Under `--unhandled-rejections=strict` that
terminates the process. It also bypassed the retry logic in name-ownership,
which only sees errors delivered to the sendAsync callback.

Changes:
- Add createEthereumProvider, a fetch wrapper that reads and parses the RPC
  body inside the awaited fetch call. A premature close / stream error now
  rejects the fetch promise that HTTPProvider does handle, so it reaches the
  sendAsync callback as an ordinary, retryable error instead of crashing.
- Broaden sendBatchWithRetry to retry transient network failures (premature
  close, ECONNRESET, timeouts, DNS blips), not just HTTP 400s.
- Add a process-level unhandledRejection backstop that logs and keeps the
  server alive, and drop --unhandled-rejections=strict (the handler is a
  no-op while strict is set) so the backstop is effective.
Pull Request #496: fix: prevent RPC premature-close from crashing the process

1400 of 1678 branches covered (83.43%)

Branch coverage included in aggregate %.

10 of 21 new or added lines in 4 files covered. (47.62%)

2975 of 3235 relevant lines covered (91.96%)

68.04 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
80.32
-7.78% src/adapters/name-ownership.ts
2
0.0
0.0% src/index.ts
Jobs
ID Job ID Ran Files Coverage
1 27793704131.1 18 Jun 2026 10:42PM UTC 215
90.18
GitHub Action Run
Source Files on build 27793704131
  • Tree
  • List 108
  • Changed 73
  • Source Changed 3
  • Coverage Changed 73
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27793704131
  • Pull Request #496
  • PR Base - main (#27792397551)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc