Skip to content

Commit

Permalink
add better response handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Sep 5, 2023
1 parent df7328f commit 6aad3da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dune_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,4 +393,7 @@ def upload_csv(self, table_name: str, data: str, description: str = "") -> bool:
"data": data,
},
)
return bool(response_json["success"])
try:
return bool(response_json["success"])
except KeyError as err:
raise DuneError(response_json, "upload_csv response", err) from err

0 comments on commit 6aad3da

Please sign in to comment.