error -4077 ECONNRESET

I got this error but I can’t find on google what code -4077 means:

_currentUrl: '',
    [Symbol(kCapture)]: false
  cause: Error: read ECONNRESET
      at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) {
    errno: -4077,
    code: 'ECONNRESET',
    syscall: 'read'

The error ECONNRESET typically indicates that the connection was forcibly closed.
But -4077 is not a standard error code, it appears to be a specific error code generated by the library TLSWrap that you’re using.
The cause it’s unclear, as it depends on your network setup and how you’re building your request. Although you could double check:

  • if it’s caused by proxy/firewall/vpn (send using a different IP);
  • use another method to send the same request (ex: Postman) and check if it’s successful, if yes, debug (see if they have same request headers, )
1 Like