A simple tcp server I had for serving the flash policy file was causing this. I can now catch the error using a handler:

# serving the flash policy file
net = require("net")

net.createServer((socket) =>
  //just added
  socket.on("error", (err) =>
    console.log("Caught flash policy server socket error: ")
    console.log(err.stack)
  )

  socket.write("<?xml version=\"1.0\"?>\n")
  socket.write("<!DOCTYPE cross-domain-policy SYSTEM \"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\">\n")
  socket.write("<cross-domain-policy>\n")
  socket.write("<allow-access-from domain=\"*\" to-ports=\"*\"/>\n")
  socket.write("</cross-domain-policy>\n")
  socket.end()
).listen(843)

sockets - How do I debug error ECONNRESET in Node.js? - Stack ...

https://stackoverflow.com/questions/17245881/how-do-i-debug-error-econnreset-in-node-js

You might have guessed it already: it's a connection error. "ECONNRESET" means the other side of the TCP conversation abruptly closed its end of the ...

What does “Error: read ECONNRESET” mean? - Quora

https://www.quora.com/What-does-%E2%80%9CError-read-ECONNRESET%E2%80%9D-mean

It means that somewhere in your amp content you added a tag that's not allowed. Check your console, AMP is usually very good at pointing where the error ...

Error read ECONNRESET | Upstash: Documentation

https://docs.upstash.com/redis/troubleshooting/econn_reset

Error read ECONNRESET. Symptom​. The client can not connect to the database throwing an exception similar to: [ioredis] Unhandled error event: Error: read ...