Skip to content

Commit 3f2e2b5

Browse files
committed
error in query_result_id throws exception #3
1 parent 2691534 commit 3f2e2b5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

duneanalytics/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
__title__ = 'duneanalytics'
33
__description__ = 'Unofficial library for Dune Analytics.'
44
__url__ = 'https://github.com/itzmestar/duneanalytics'
5-
__version__ = '1.0.2'
5+
__version__ = '1.0.3'
66
__build__ = 0x010001
77
__author__ = 'Tarique Anwer'
88
__author_email__ = '[email protected]'

duneanalytics/duneanalytics.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def fetch_auth_token(self):
7878
response = self.session.post(session_url)
7979
if response.status_code == 200:
8080
self.token = response.json().get('token')
81+
else:
82+
print(response.text)
8183

8284
def query_result_id(self, query_id):
8385
"""
@@ -98,6 +100,8 @@ def query_result_id(self, query_id):
98100
if response.status_code == 200:
99101
data = response.json()
100102
print(data)
103+
if 'error' in data:
104+
return None
101105
result_id = data.get('data').get('get_result').get('result_id')
102106
return result_id
103107
else:

0 commit comments

Comments
 (0)