Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💡 [REQUEST] - Populate error message in the ethers-adapter #1498

Open
freemanzMrojo opened this issue Nov 11, 2024 · 0 comments
Open

💡 [REQUEST] - Populate error message in the ethers-adapter #1498

freemanzMrojo opened this issue Nov 11, 2024 · 0 comments

Comments

@freemanzMrojo
Copy link
Member

Summary

As of now, when not having VTHO to run transactions (probably it happens for other errors too), we do not print the error message correctly, just the HTTP code:

     }
      -Internal error: 
      	Error on request eth_sendRawTransaction: Error: Method 'HttpClient.http()' failed.
      -Reason: 'HTTP 403 Forbidden'
      -Parameters: 
      	{
        "method": "POST",
        "url": "https://testnet.vechain.org/transactions"
      }
      -Internal error: 
      	HTTP 403 Forbidden
          at Jt (/home/runner/work/vechain-sdk-js/vechain-sdk-js/packages/network/dist/index.js:31:35492)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
          at async Object.eth_sendTransaction (/home/runner/work/vechain-sdk-js/vechain-sdk-js/packages/network/dist/index.js:31:42686)
          at async yn.request (/home/runner/work/vechain-sdk-js/vechain-sdk-js/packages/network/dist/index.js:31:45992)
          at async yn.request (/home/runner/work/vechain-sdk-js/vechain-sdk-js/packages/network/dist/index.js:31:48808)
          at async yn.send (/home/runner/work/vechain-sdk-js/vechain-sdk-js/packages/network/dist/index.js:31:48108)
          at async HardhatEthersSigner.sendTransaction (/home/runner/work/vechain-sdk-js/vechain-sdk-js/node_modules/@nomicfoundation/hardhat-ethers/src/signers.ts:125:18)
          at async ContractFactory.C.t.deploy (/home/runner/work/vechain-sdk-js/vechain-sdk-js/packages/ethers-adapter/dist/index.js:6:727)
          at async Context.<anonymous> (/home/runner/work/vechain-sdk-js/vechain-sdk-js/apps/sdk-hardhat-integration/test/VechainHelloWorldWithNonEmptyConstructor.testnet.test.ts:30:26)

The purpose of this ticket is to fix this problem and print the error message as in the other packages.

Basic Example

It happened in this pipeline https://github.com/vechain/vechain-sdk-js/actions/runs/11779763339/job/32809360681

@freemanzMrojo freemanzMrojo changed the title 💡 [REQUEST] - Populate error message in the hardhat-plugin 💡 [REQUEST] - Populate error message in the ethers-adapter Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant