Skip to content

Commit

Permalink
fix: print the responses if we can't parse it.
Browse files Browse the repository at this point in the history
  • Loading branch information
sileht committed Apr 2, 2024
1 parent b646071 commit 791e1e3
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions linear-extract-reviewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,18 @@ def main() -> None:
print(responses, file=sys.stderr)
sys.exit(1)

creators = ",".join(
email_mapping[response["creator"]["email"]]
for response in responses["data"].values()
if response.get("creator") and response["creator"].get("email")
)
if creators:
print(f"CREATORS={creators}")
try:
creators = ",".join(
email_mapping[response["creator"]["email"]]
for response in responses["data"].values()
if response.get("creator") and response["creator"].get("email")
)
if creators:
print(f"CREATORS={creators}")
except Exception:
print(responses, file=sys.stderr)
raise



main()

0 comments on commit 791e1e3

Please sign in to comment.