Merge "Handle Github changed files errors more broadly"

This commit is contained in:
Zuul 2022-11-29 19:37:32 +00:00 committed by Gerrit Code Review
commit 8a26020eb6
1 changed files with 2 additions and 2 deletions

View File

@ -1835,9 +1835,9 @@ class GithubConnection(ZKChangeCacheMixin, ZKBranchCacheMixin, BaseConnection):
if hasattr(pr_file, "previous_filename"):
files.append(pr_file.previous_filename)
pr['files'] = files
except github3.exceptions.ServerError as exc:
except github3.exceptions.ResponseError as exc:
# NOTE: For PRs with a lot of lines changed, Github will return
# an error (HTTP 500) because it can't generate the diff.
# an error (HTTP 500, 422, ...) because it can't generate the diff.
self.log.warning("Failed to get list of files from Github. "
"Using empty file list to trigger update "
"via the merger: %s", exc)