Skip to content

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

Open
@cryptosystems6300

Description

@cryptosystems6300

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions