cardano-graphql icon indicating copy to clipboard operation
cardano-graphql copied to clipboard

INTERNAL_SERVER_ERROR: TypeError: Cannot read properties of null (reading 'assetId')

Open cryptosystems6300 opened this issue 7 months ago • 2 comments

Summary

Graphql query returns an unexpected internal server error

Steps to reproduce the bug

  1. send graphql query
query {
  paymentAddresses(
    addresses: [
      "addr1qygcsk5l4xh3y3m8j8akv93yyun06wfadrr3de02vj80xyg33pdfl2d0zfrk0y0mvctzgfexl5un66x8zmj75eyw7vgsfpl75e"
    ]
  ) {
    summary {
      assetBalances {
        asset {
          assetId
        }
        quantity
      }
    }
  }
}

Actual Result

{
  "errors": [
    {
      "message": "TypeError: Cannot read properties of null (reading 'assetId')",
      "locations": [
        {
          "line": 5,
          "column": 5
        }
      ],
      "path": [
        "paymentAddresses",
        0,
        "summary"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "stacktrace": [
            "Error: TypeError: Cannot read properties of null (reading 'assetId')",
            "    at /app/packages/api-cardano-db-hasura/dist/executableSchema.js:93:39",
            "    at Generator.throw (<anonymous>)",
            "    at rejected (/app/packages/api-cardano-db-hasura/dist/executableSchema.js:6:65)",
            "    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
          ]
        }
      }
    }
  ],
  "data": {
    "paymentAddresses": [
      {
        "summary": null
      }
    ]
  }
}

Expected Result

actual balances

Environment

mainnet

Platform

  • [ ] Linux (Ubuntu)
  • [ ] Linux (Other)
  • [ ] macOS
  • [ ] Windows

Platform version

No response

Runtime

  • [ ] Node.js
  • [ ] Docker

Runtime version

No response

cryptosystems6300 avatar Jul 04 '24 08:07 cryptosystems6300