duneanalytics / dune-client

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

Handle case when `expires_at` isn't returned #10

Closed bh2smith closed 2 years ago

bh2smith commented 2 years ago

Although it is not documented, we have been experiencing responses with no field "expires_at". Thus we were forced to make it optional.

2022-09-05 12:57:55,335 DEBUG urllib3.connectionpool https://api.dune.com:443 "GET /api/v1/execution/01GC79CKH6VETQCWX02EX369SF/status HTTP/1.1" 200 179
2022-09-05 12:57:55,337 DEBUG dune_client.client received response {'execution_id': '01GC79CKH6VETQCWX02EX369SF', 'query_id': 649345, 'state': 'QUERY_STATE_EXECUTING', 'submitted_at': '2022-09-05T16:57:54.982539Z', 'execution_started_at': '2022-09-05T16:57:55.008533431Z'}

Test Plan

Added test to ensure parsable.