Skip to content

Commit

Permalink
fix: log error instead of raise RuntimeError
Browse files Browse the repository at this point in the history
  • Loading branch information
seendsouza authored and nazariyv committed Feb 7, 2024
1 parent e6d50c3 commit 2e25609
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions notification_discord_bot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ def query_the_graph(
res.raise_for_status()
data = json.loads(res.content)
if errors := data.get("errors"):
logger.error(f"Error in {query_url} with query:\n{the_graph_query}")
raise RuntimeError(str(errors))
logger.error(
f"Error in {query_url} with query:\n{the_graph_query}\n{json.dumps(errors)}"
)
return {}
return data


Expand Down

0 comments on commit 2e25609

Please sign in to comment.