The remote side reset the TCP connection while Node was reading from it. In CI this is a classic flaky-test failure - a keep-alive socket closed, a proxy dropped the connection, or the network blipped.
What this error means
An HTTP test intermittently fails with read ECONNRESET. Re-running the same job usually passes, which is the signature of a transient connection reset rather than a real bug.
Add bounded retries for ECONNRESET in network-bound tests.
Avoid reusing keep-alive sockets across flaky test boundaries.
Isolate real-network tests so resets do not fail unrelated suites.
Frequently asked questions
What causes ""read ECONNRESET""?
A server or proxy closed an idle keep-alive socket just as the client reused it, producing a reset mid-read. This is intermittent.
How do I fix "read ECONNRESET"?
Wrap the request in a bounded retry that treats ECONNRESET as retryable.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.