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

fix: add node response logging for undefined error #646

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

jsy1218
Copy link
Member

@jsy1218 jsy1218 commented Jul 30, 2024

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Bug fix

  • What is the current behavior? (You can also link to an open issue here)
    There are some unexpected error from shadow calling tenderly node endpoint:

TypeError: Cannot read properties of undefined (reading 'length')
    at vCe.sampleNodeEndpoint (/node_modules/@uniswap/smart-order-router/src/providers/tenderly-simulation-provider.ts:791:67)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
hostname	
169.254.94.253
level	
50
msg	
Failed to invoke Tenderly Node Endpoint for gas estimation bundle {
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tenderly_estimateGasBundle",
  "params": [
    [
      {
        "from": "0xc1092Fff8e8d0208167040143C10b8eDCAB17e63",
        "to": "0xad162d5523cDE449d91e3be69ca38bC157B18E53",
        "data": "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
      },
      {
        "from": "0xc1092Fff8e8d0208167040143C10b8eDCAB17e63",
        "to": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
        "data": "0x87517c45000000000000000000000000ad162d5523cde449d91e3be69ca38bc157b18e530000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000067418f5f"
      },
      {
        "from": "0xc1092Fff8e8d0208167040143C10b8eDCAB17e63",
        "to": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
        "data": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000066a8fb37000000000000000000000000000000000000000000000000000000000000000308060c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000015fb06875db601f671c00000000000000000000000000000000000000000000000034259486f23d36b500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000ad162d5523cde449d91e3be69ca38bc157b18e53000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000060000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000fee13a103a10d593b9ae06b3e05f2e7e1c00000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000040000000000000000000000000c1092fff8e8d0208167040143c10b8edcab17e63000000000000000000000000000000000000000000000000340434cbba97f0cf"
      }
    ],
    "0x1379585"
  ]
}. Error: TypeError: Cannot read properties of undefined (reading 'length')

We don't know what the response looked like to cause this error

  • What is the new behavior (if this is a feature change)?
    We will add new logging to ensure uncaught exception won't get throw, and instead we will log the response entirely in case resp.result is undefined.

  • Other information:

Copy link
Member Author

jsy1218 commented Jul 30, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @jsy1218 and the rest of your teammates on Graphite Graphite

@jsy1218 jsy1218 marked this pull request as ready for review July 30, 2024 14:36
@jsy1218 jsy1218 requested a review from a team as a code owner July 30, 2024 14:36
@graphite-app graphite-app bot requested review from cgkol, xrsv and mikeki July 30, 2024 14:36
Copy link

graphite-app bot commented Jul 30, 2024

Graphite Automations

"Request reviewers once CI passes on smart-order-router repo" took an action on this PR • (07/30/24)

4 reviewers were added and 1 assignee was added to this PR based on 's automation.

@jsy1218 jsy1218 merged commit b0612a3 into main Jul 30, 2024
23 of 26 checks passed
@jsy1218 jsy1218 deleted the siyujiang/node-response-undefined-logging branch July 30, 2024 15:03
@jsy1218 jsy1218 mentioned this pull request Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants