Skip to content

Commit

Permalink
Merge pull request #1012 from chaoss/dev
Browse files Browse the repository at this point in the history
Fixes issues caused by GraphQL error Message Change on GitHub
  • Loading branch information
gabe-heim authored Nov 12, 2020
2 parents 3cc3a9d + 77e7ea8 commit 860d72b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion workers/pull_request_worker/pull_request_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ def find_root_of_subject(data, key_subject):

if 'errors' in data:
self.logger.info("Error!: {}".format(data['errors']))
if j['errors'][0]['type'] == 'NOT_FOUND':
self.logger.warning("Github repo was not found or does not exist for endpoint: {}\n".format(url))
break
if data['errors'][0]['type'] == 'RATE_LIMITED':
self.update_gh_rate_limit(response)
num_attempts -= 1
Expand All @@ -133,7 +136,7 @@ def find_root_of_subject(data, key_subject):

if not success:
self.logger.info('GraphQL query failed: {}'.format(query))
continue
break

before_parameters.update({
data_subject: ', before: \"{}\"'.format(page_info['startCursor'])
Expand Down

0 comments on commit 860d72b

Please sign in to comment.