Skip to content

Commit

Permalink
Exercise some paranoia accessing GH GraphQL return (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
webbnh authored Dec 10, 2024
1 parent 3638e0f commit 0857737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sync2jira/upstream_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def add_project_values(issue, upstream, headers, config):
orgname, reponame, issuenumber, response.text)
return
data = response.json()
gh_issue = data['data']['repository']['issue']
gh_issue = data.get('data', {}).get('repository', {}).get('issue')
if not gh_issue:
log.debug("GitHub error while fetching issue %s/%s#%s: %s",
orgname, reponame, issuenumber, response.text)
Expand Down

0 comments on commit 0857737

Please sign in to comment.