Skip to content

improve error handling of substreams powered subgraphs#5750

Merged
mangas merged 1 commit into
masterfrom
shiyasmohd/fix-substreams-subgraph-status
Jan 16, 2025
Merged

improve error handling of substreams powered subgraphs#5750
mangas merged 1 commit into
masterfrom
shiyasmohd/fix-substreams-subgraph-status

Conversation

@shiyasmohd

@shiyasmohd shiyasmohd commented Dec 30, 2024

Copy link
Copy Markdown
Contributor

Fixes #5749

Deployed a SPS to studio with error - QmRxqwbpjKxmAQkXVgAwS65xvtAyyoVSpxd1J554AxYFN6

curl --location 'https://api.thegraph.com/index-node/graphql' \
--header 'Content-Type: application/json' \
--data '{"query":"{\n        indexingStatuses(subgraphs: [\"QmRxqwbpjKxmAQkXVgAwS65xvtAyyoVSpxd1J554AxYFN6\"]){\n            subgraph\n            synced\n            health\n            fatalError {\n                message\n                handler\n                deterministic\n            }\n            nonFatalErrors{\n                message\n                block{number}\n            }\n        }\n    }","variables":{}}' | jq .

This request returns subgraph is still healthy and doesn't add any error to fatal Errors field

{
  "data": {
    "indexingStatuses": [
      {
        "subgraph": "QmRxqwbpjKxmAQkXVgAwS65xvtAyyoVSpxd1J554AxYFN6",
        "synced": false,
        "health": "healthy",
        "fatalError": null,
        "nonFatalErrors": []
      }
    ]
  }
}

This PR fixes this issue.

Index node api response when locally running this branch and deploy the SPS with error

{
    "data": {
        "indexingStatuses": [
            {
                "subgraph": "QmRxqwbpjKxmAQkXVgAwS65xvtAyyoVSpxd1J554AxYFN6",
                "synced": false,
                "health": "failed",
                "fatalError": {
                    "message": "error while executing at wasm backtrace:\t    0: 0x43f2 - <unknown>!src/mappings/handleTriggers: Entity Token[0x4200000000000000000000000000000000000006]: missing value for non-nullable field `totalSupply`: Entity Token[0x4200000000000000000000000000000000000006]: missing value for non-nullable field `totalSupply`",
                    "handler": null,
                    "deterministic": false
                },
                "nonFatalErrors": []
            }
        ]
    }
}

@shiyasmohd shiyasmohd self-assigned this Dec 30, 2024
@shiyasmohd
shiyasmohd requested a review from mangas January 3, 2025 14:03
@mangas
mangas merged commit 2be1cc3 into master Jan 16, 2025
@mangas
mangas deleted the shiyasmohd/fix-substreams-subgraph-status branch January 16, 2025 13:53
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.

[Bug] substreams powered subgraph is healthy even if its failed

2 participants