graphprotocol / graphprotocol/indexer-rs

internal error when querying unknown subgraph with free query auth

Open
#571 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
31
Forks
29
Avg merge
13h 9m
Merged PRs (30d)
13

Description

Describe the bug
Sending a query through the indexer-service, when using a free query auth token, sometimes results in an HTTP 500 error. It seems to work as expected when querying a subgraph that is being indexed.

To Reproduce

curl "${indexer_url}/subgraphs/id/${deployment}" \
  -H 'content-type: application/json' -H "authorization: Bearer ${auth_token}" \
  -d '{"query": "{ _meta { block { number } } }"}' -v

where deployment is a valid "Qm" hash for a deployment that does not exist (e.g. a deployment from testnet when running the indexer-service on mainnet).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided curl request against indexer-service with a valid but unknown deployment and free query auth token. Trace the request's error handling and compare it with a query for an indexed subgraph; done means the unknown-subgraph request no longer produces an HTTP 500.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.