Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

The real error during http connections is gobbled up and only a generic message is printed  #5954

@clydedacruz

Description

@clydedacruz

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Error: CONNECTION ERROR: Couldn't connect to node https://192.168.200.200:30041.
   at Object.ConnectionError (/somedapp/node_modules/web3-core-helpers/lib/errors.js:66:23)
   at Object.InvalidConnection (/somedapp/node_modules/web3-core-helpers/lib/errors.js:36:21)
   at HttpProvider.failed (/somedapp/node_modules/web3-providers-http/lib/index.js:139:25)
   at processTicksAndRejections (node:internal/process/task_queues:96:5)

Expected Behavior

Error: CONNECTION ERROR: Couldn't connect to node FetchError: request to https://192.168.200.200:30041/ failed, reason: connect ECONNREFUSED 192.168.200.200:30041.
    at Object.ConnectionError (/somedapp/node_modules/web3-core-helpers/lib/errors.js:66:23)
    at Object.InvalidConnection (/somedapp/node_modules/web3-core-helpers/lib/errors.js:36:21)
    at HttpProvider.failed (/somedapp/node_modules/web3-providers-http/lib/index.js:140:25)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Steps to Reproduce

Try using https://github.com/web3/web3.js/tree/1.x/packages/web3-providers-http with a URL that is down or with a JSON RPC endpoint that uses a self signed certificate.

Web3.js Version

1.8.2

Environment

  • Operating System: Ubuntu 20.04
  • Browser: NA
  • Node.js Version: 16.18.0
  • NPM Version: 8.19.2

Anything Else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.x1.0 related issuesBugAddressing a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions