duneanalytics / dune-client

A framework for interacting with Dune Analytics' officially supported API service
Apache License 2.0
85 stars 22 forks source link

Fix API response parsing #17

Closed bh2smith closed 2 years ago

bh2smith commented 2 years ago

Today was the first day we saw Query State Pending response types with queue_position. Had to adapt the response parsing logic to accomodate:

    raise DuneError(response_json, "ExecutionStatusResponse") from err
dune_client.models.DuneError: Can't build ExecutionStatusResponse from {'execution_id': '01GDWCZN82CFV43H17977RC2RX', 'query_id': 649345, 'state': 'QUERY_STATE_PENDING', 'queue_position': 33894, 'submitted_at': '2022-09-26T08:00:42.669254Z'}
bh2smith commented 2 years ago

Currently e2e tests are failing because there are a some load issues on Dune server side. This PR preemptively adds queue handling (since we hadn't previously). When Dune is back up and running we can rerun the tests here and should be ready to merge.