Skip to content

connect EINVAL crashes the entire process #1737

@vladtreny

Description

@vladtreny

Describe the bug

  • Node.js version: 14-16
  • OS & version: Windows & LInux

Hello again,
This time I found another site that crashes node program. Not sure if it is possible to fix.

Actual behavior

Node crashes. Try catch doesn't help.
Error:

Error: connect EINVAL fe80::e449:f450:9a1e:4f2c:8081 - Local (:::0)
     at internalConnect (node:net:905:16)
     at defaultTriggerAsyncIdScope (node:internal/async_hooks:435:18)
     at node:net:996:9
     at processTicksAndRejections (node:internal/process/task_queues:78:11)

Expected behavior

Avoid node crashes and get an error

Code to reproduce

const test = await got.get('http://sjzzx.gov.cn/ztzl/dsxxjy');
console.log(test);

Checklist

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and Got.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething does not work as it shouldexternalThe issue related to an external projectnodejs bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions